Home > Back-end >  Who will help me to fill in the pit of the c language?
Who will help me to fill in the pit of the c language?

Time:10-01

Ask why I compiled a c program
The same code devc++ and vc + + indicates a mistake
Such as printf didn't define
But I copied to VS can perfect run?
I'm really just cry!
//calculate all contain between 1 and 200 the number of 3 and
# include & lt; Stdio. H>
Int main ()
{int sum=1, a, b, c, result=0;
While (sum & lt; {
=200)A=sum % 10; The number of bits//o
B=sum/100;//for the number of one hundred
C=sum/10 - b * 10;//for several ten
If (a==3 | |==3 b | | c==3)
Result=sum + result;
//to determine whether a number of 3 and add
Sum=sum + 1; }
Printf (" the result is % d \ n ", result);
}

CodePudding user response:

Output in the loop

CodePudding user response:

And the result, the role of is what, you want to output meet the conditions of direct digital output sum is ok

CodePudding user response:

Walk slowly, I can't see requirements and the result is right, that is the output in the loop, there is a problem

CodePudding user response:

Procedures should be no problem, or visual Studio won't compile ah and display the correct answer?
I just don't know why can't a dev and vc to compile like visual Studio, but suggest what bullshit printf is not defined,,,

CodePudding user response:

Procedures should be no problem, or visual Studio won't compile ah and display the correct answer?
I just don't know why can't a dev and vc to compile like visual Studio, but suggest what bullshit printf is not defined,,,
  • Related