C language correction high score, C language correction,

Updated on technology 2024-05-25
7 answers
  1. Anonymous users2024-02-11

    ** in ** does not match the title. Please send a separate match**.

  2. Anonymous users2024-02-10

    The initial value of sum's assignment is wrong, it should be 0

  3. Anonymous users2024-02-09

    1、if(('a'<=c[k]<='z'This sentence should be changed to read:

    if(c[k]>='a'&&c[k]<='z')2、gets(c[50]);This sentence is wrong, change it to:

    gets(c);

    3、int n[26]=,k;This sentence is changed to: int n[26]=,k 0;

    4、while(c[k]!='0') to : while(c[k]!='\0')

    The modified procedure is as follows:

    #include ""

    void main()

    k=0;gets(c);

    puts(c);

    while(c[k]!='\0')

    if(c[k]>='a'&&c[k]<='z')for(k=0;k<26;k++)

    printf("%c:%d",k+'a',n[k]);

    It's already running through!

  4. Anonymous users2024-02-08

    #3 int n[26]=,k=0;*k not initialized*5 gets(c); * Remove the length, and the array name is the first address

    #6 while(c[k]!='\0'*7 if('a'<=c[k] &c[k]<='z'Connect with &&

    #10 for(k=0;k<26;k++) * remove the semicolon *

  5. Anonymous users2024-02-07

    First of all, the method of comparison is to compare the elements separately with the elements behind it to see if there are any equals, therefore.

    a[0] vs. a[1] a[9].

    a[1] is compared with a[2] a[9], note that a[1] does not need to be compared with a[0] here, corresponding to the second error.

    There are probably a few errors:

    i;ja[ i ] = a[ j ] if( a[ i ] == a[ j ] symbol error'='It is an assignment statement, if you use '=', the condition will always be true, and if '==' is equal to compare, the value of establishment is 1, and if it is not true, it is 0

    no"if(isyes ==0), the problem requires that there is an equal output no, and there is no output 0, and there is an equal isyes =0 in the program, and the corresponding output should output no, so it should be changed to isyes==0;

    Write the program landlord himself to think more, very interesting, I wish you progress!

  6. Anonymous users2024-02-06

    Please, you send ** It's very uncomfortable to look at, no one will like this way, only 3 places have been changed!

    for(i=0; ifor(j=0; jif( a[ i ] = a[ j ] // if( a[ i ] == a[ j ]

  7. Anonymous users2024-02-05

    1、printf("m = %d,n*100 = %d,m,n,n*100");

    a. First of all, double quotation marks "", the position behind it is wrong. It should be in the back"m = %d,n*100 = %d“,m,n,n*100

    b. Again, there are three parameters in the output, and only two %d are marked in the formatted output string, which literally means output m and n*100. However, n also appears after m, so the output n, the formatted output should be added, and the output that n is float should be n = %f

    c, n*100 should also correspond to %f

    2. A, ABC is a double type, but it is input as an integer.

    b. The first output, which is also the type of output, should also be double. But it is output in shape.

    c. The second output, without this form of output, the formatted output character can only be written once in the front, and cannot be divided. The second output character format is also wrong, it should be of the double type.

Related questions
16 answers2024-05-25

Definition of a for loop.

for(the initial value of the variable; termination of operating conditions; The initial value of the first cycle i is 0, and it runs until i=3 stops i=2, and the condition is still satisfied, and the loop body is still executed, and the step size is 1+1 each time >>>More

9 answers2024-05-25

Hey! This is a very simple function to write, Your Excellency is estimated to have just learned data structures, now learn sorting, lookup, it's easy to give me a reward of two hundred points, I'll help you write it right away. >>>More

8 answers2024-05-25

I thought about it for a long time and didn't come up with it. >>>More

7 answers2024-05-25

It's called the [batch] program, in fact, don't think that the program you mentioned above to deal with garbage is really powerful, it's amazing, when you have learned DOS, that program can be said to be a very simple thing; >>>More

8 answers2024-05-25

system("command");The role is to open the "Command Prompt", and later you can manually enter DOS commands. >>>More