Message from C, C++ discussions

November 2019

— Tell him, then. I can't do nothing, but thank you for telling me this.

— 

I'm in the 4th year of scientific liceum (Italy) and we are still doing this. 3/4 of the class still don't understand this, and we've been doing algorithms, flow charts and pseudo-C since February-March (when we still were in the 3rd year...)

— Oh, in the flow chart I forgot "Insert N" before "Insert V"

— And in the code I forgot "gets(N);" after "N, C, V, S = 0"

— Void main()
{
int N, C;
float V, S;
N=0, C=0, S = 0;

gets(V); /*(prefer it to input string,use scanf for INTEGER VALUES)*/


C = C+1;
if(V>0&&V<100) /*don't terminate if and for loop statements */
{
S=S+V;

}
printf("The sum is %d", S);
}

Message permanent page

— /* statement*/
Are my comments .don't include them in program while coding

— But scanf would require to use & somewhere in the parenthesis 🤔 and %d too. That's what my teacher said...

Message permanent page

— Well ,I might be wrong ,but I do it this way.

— Idk, but your help is precious anyways

— You can use puts() too,
But Don't forget about the scanf().
In long run it could also help.

— I mean gets()

— We are used to scanf(%d, &n)