Home > Back-end >  First to compile the program, modify the grammatical mistakes. Then use the method of set breakpoint
First to compile the program, modify the grammatical mistakes. Then use the method of set breakpoint

Time:12-11

First to compile the program, modify the grammatical errors, and then use the method of set breakpoints, find and modify the program of semantic error, make its complete calculation,
1! + 2! +... + 11! ,
#include
Void fac (int n);
{int I f;
For (I=1; i<=n; I++) f=f * I;
Returnf;//when debugging, set breakpoints
}
Voidmain ()
{int I add;
For (I=1; i<=11; I++)
The add=add + fac (I);//when debugging, set breakpoints
Printf (" 1! + 2! +... + 11! F=% \ n ", add);//when debugging, set breakpoints
}

CodePudding user response:

Is sent? Still?

CodePudding user response:

In the two functions f, add no initialization, so you get the wrong numerical

CodePudding user response:

Upstairs said to oh, his fac int f=1; His main int add=0; Initialization, or f, the add is a random number

CodePudding user response:

Send the wrong topic
  • Related