C The input in the program cannot be executed, and the input is not performed directly after running

Updated on technology 2024-04-23
16 answers
  1. Anonymous users2024-02-08

    #include

    using namespace std;

    int cube[100][100][100][100]=;

    int main()

    int a,b,c,d,n;

    cin>>n;

    for(a=0;afor(b=0;bfor(c=0;cfor(d=0;dif((a+1)*(a+1)*(a+1)==(b+1)*(b+1)*(b+1)+(c+1)*(c+1)*(c+1)+(d+1)*(d+1)*(d+1))

    cube[a][b][c][d]=1;

    for(a=0;afor(b=0;bfor(c=0;cfor(d=0;dif(cube[a][b][c][d])

    cout<<"cube="Define the cube array as a global try, how do I remember that the local array doesn't seem to be able to get the initial value like this.

    100*100*100*100*4 1024 1024=381 This array is about 381 MB, which is not very large, and can still be defined on an ordinary computer.

    Tried it and it worked.

  2. Anonymous users2024-02-07

    I think the memory you applied for is too big, 100x100x100x100 is too big!

  3. Anonymous users2024-02-06

    Your grammar is wrong. For is followed by a semicolon, which proves that it is a statement, and it will end after all the executions are completed, and it will not reach the scanf statement. You can't enter until the three loops are executed, but the values of i and j are already outside the array range, so you can't enter them.

  4. Anonymous users2024-02-05

    I can't enter the question C language running page.

    The question was entered.

    Haha, your program is in an endless loop.

    It's not that you can't type, it's that the program runs endlessly Tell me what your program is going to do?

    Ask a question to calculate 1+3+....101

    for(i=1;i<=101;i+=2)

    Just change this sentence.

    Okay, thank you.

  5. Anonymous users2024-02-04

    char s[5][20];

    float a[3][3];

    for(int i = 0; i <= 4; i++)scanf("%s", &s[i]);Enter 5 strings printf("%c", s[1][2]);

    for(int i = 0; i <= 2; i++)for(int j = 0; j <= 2; j++)scanf("%f", &a[i][j]);Enter a 3*3 matrix.

  6. Anonymous users2024-02-03

    This is normal. Even if your program is the same as everyone else's, the compilation environment must be different, and the problem you mentioned will appear. It is recommended that you read the error message carefully and seek a solution to the problem from the error message. I really can't solve it.,Please post the source program and errors.。

  7. Anonymous users2024-02-02

    What is the specific error, and it is better for your program to post it as well, otherwise it will be difficult to help you judge.

    In this case, there is a problem with your C++ software settings.

  8. Anonymous users2024-02-01

    It's possible that you don't have the msdn library installed, so you can try it.

  9. Anonymous users2024-01-31

    I've had this kind of issue as well, and there are two possible causes.

    One is the software installation problem, most of the VC compilers we use now are not compatible with Win7, and in some cases, even if the system is the same, there will be some errors when installing the program, causing the program to not run normally.

    It's also possible that you don't have an initial value assigned to some variable in your program, but you still use the value that appears randomly at the beginning, and different computers randomly allocate different memory units, which may also be the case.

    So, you first check if there are some variables in the program that you don't need to assign initial values. If there is really no problem with the program, then you have to reinstall the compilation software.

  10. Anonymous users2024-01-30

    The problem is with the scanf statement.

    The format of the scanf is:

    Note:Double quotation marks areEnglish characters, the variable address table is outside the double quotes.

    So scanf("%d,%d,&a,&b");It should be modified to:scanf("%d,%d",&a,&b);

    The result is as follows:

  11. Anonymous users2024-01-29

    scanf("%d,%d",&a,&b);

    You""The range does not wrap &a, &b.

  12. Anonymous users2024-01-28

    If you type 8 or 5, don't use it, just use a space.

  13. Anonymous users2024-01-27

    In addition to the bugs already pointed out above, you have this app as well:

    1)printf("%s",a[20]);a is an integer, you can't use %s, apply %i.

    2) a[20] subscript can only be 0-19, you use 20 is out of bounds.

    3) Scanf cannot be used continuously, it cannot read out carriage returns, which will make the following scanf unable to be executed effectively. Clear the carriage return with Clear Cache each time for it to perform correctly. (You can add a gets after the scanf statement).

    4) %c in scanf, you can only enter 1 asc code, you define an integer number, no error, but you can't enter the data of the integer set.

    It is recommended to learn how to use scanf printf and how to format characters.

  14. Anonymous users2024-01-26

    i is not defined in the first for loop.

    The semicolon of the third for loop you wrote as a comma.

  15. Anonymous users2024-01-25

    Reload and try it once.

  16. Anonymous users2024-01-24

    When running the input, the input format is mainly in the accompanying state to see the format in scanf.

    scanf("%f,%f,%f",&a,&b,&c) %f is separated by a comma when running the input.

    scanf("%f%f%f",A,&b,&c) %f, then the input space grid can be separated.

    So the input in Figure 2 is incorrect, and there is some messy data.

    But why Figure (1) appears is because you have an extran is used as an escape character for line breaks, and is generally used in scattered printf to control the output format. After it is out, you can add a comma and enter it to find that it is good.

    As for why this situation occurs, there is also the specific process of chaotic data in Figure (2), which is difficult to explain clearly.

Related questions
6 answers2024-04-23

There are a lot of problems. Such as overflow, missing library files, etc!! >>>More

6 answers2024-04-23

Just make an input judgment :

I just noticed that you are using C, and I started to think that you are using Delphi, which I saw in the Delphi team. >>>More

9 answers2024-04-23

Pure hand play hope it will help you.

Start Menu - Run - Enter msconfig Enter In the boot bar in the inside, put **Just remove the tick in front of the dll 1. Start - run - msconfig - start - remove the tick of the add-on ***dll. Restart the computer, usually this is it, if it still pops up, go to the second step 2, start-run-regedit in the following position to delete the corresponding key: >>>More

5 answers2024-04-23

Can't locate the program input point, what the hell is going on? Unable to locate program input points when they appear: 1) Displayed when entering the system at boot Unable to locate program input points on dynamic links 2) Running stand-alone games Unable to locate program input points on dynamic links when playing online games 3) Displayed when running common software attacks Unable to locate program input points on dynamic links What causes the program input points to be unable to locate program input points? >>>More

9 answers2024-04-23

#include

#include"" >>>More