scanf cannot be run in xcode

Updated on technology 2024-05-05
14 answers
  1. Anonymous users2024-02-09

    Has the landlord solved this problem?

  2. Anonymous users2024-02-08

    There are three buttons on the left side of the organization button in the upper right corner, one of which pops up the console below, and when it appears, directly command r to run the program, and then enter it in the console.

  3. Anonymous users2024-02-07

    The %d of scanf can only be used to input integers, you use 3 %d, there is no separator in between, so the program does not know that it is splitting in **, so the result ntype becomes 0. If you need to enter a floating-point number, you can use float ntype; declaration, and specify the input format with %f, e.g. scanf("%f %d %d",..And when entering, a half-width space is used in the middle, so that each variable can be correctly assigned.

  4. Anonymous users2024-02-06

    Change the type of nnum to dnum (or fnum) for double (or float) and change the display format to"%lf"(or.)"%f")。

  5. Anonymous users2024-02-05

    C++ uses Cin instead of Scanf.

    **Modified to std::cin>>m>>b>>c;

  6. Anonymous users2024-02-04

    "%c%c%c"

    Here's what the format looks like.

  7. Anonymous users2024-02-03

    The format string starts with %.

    The landlord was confused.

  8. Anonymous users2024-02-02

    Key questions.

    The addition of & to the variable in your scanf causes you to enter a and then you don't have to enter it again.

    You change it to ("%d", &b) try.

    Explain why. Execute it twice, which is related to the buffer and should not be related to carriage return.

    Actions such as your carriage return are remembered as the next input.

  9. Anonymous users2024-02-01

    Don't use enter on the numpad

  10. Anonymous users2024-01-31

    #include

    int main()

    1.After typing **, click on the triangle symbol in the upper left corner, and then run the program, sometimes because the program has already run once, so when you run it again, a related interface will pop up to ask, click stop, 2After running, enter the values in the correct format in the input and output boxes, 3Click enter, and you can see the result of the run.

    The standard for judging whether the program has been run in xcode: see if the last line of the output box output is about returning to a 0, if this line is not displayed, it means that **is still reading and running, and it is not finished, it is waiting for you to enter some information, and then the system waits for you to enter some values, and then continues to read the **,)

  11. Anonymous users2024-01-30

    Enter multiple times or give more than a few scanf parameters, such as scanf("%d%d%d",&a,&b,&c)。

    Or write the input in a loop.

    In addition, if there is an error or input, there will be a continuous input interruption.

  12. Anonymous users2024-01-29

    If you ask that the program can be entered on the first run, but it can't be entered on the second run, you can just printf something at the beginning of the main function, and then solve it, and delete the printf when you submit **.

  13. Anonymous users2024-01-28

    1 double quotation marks are indeed wrong, Tong 1st floor.

    2. If you can only enter 1, you can see if the data type of your anynumber is char

  14. Anonymous users2024-01-27

    You're not in the right quote, right?

    scanf("%i",&anynumber);

Related questions
25 answers2024-05-05

For work that cannot be completed in a timely manner, the following two aspects should be done: >>>More

6 answers2024-05-05

If the job responsibilities cannot be completed after training or job adjustment, the contract can be terminated with 30 days' written notice or additional payment of one month's salary. Therefore, if the contract is terminated, one month's salary and economic compensation shall be paid to the cleaner according to the number of years of service of the unit. >>>More

20 answers2024-05-05

We all know that our country is really a very responsible big country, and we can also have the courage to undertake the great task of economic development, and we can also devote ourselves to maintaining world peace, and we can also strive to have a better exchange with foreigners, and we can also work harder to have a better cooperation with those countries, because we are very much in agreement with the cooperation between those countries and us, and we also believe that cooperation can make the world economy better, and can also make the world develop better. Moreover, it can also make the world more peaceful and allow us to have a better development. This is a community with a shared future that we have always advocated, and it is also a concept that we are constantly developing. Japan is very eager to cooperate with other countries, and it also wants to develop the world economy. >>>More

3 answers2024-05-05

That in the object clause can be omitted, and in the definite clause, if the introductory word that acts as an object in the clause, it can be omitted. >>>More

9 answers2024-05-05

Bananas: When stored in an environment below 12, it will make it black and rotten. >>>More