//exercise 5.3 write input digital applications, the output end is 0, input, the program automatically output of accumulative and so far,
#include
using namespace std;
Int main () {
Long I, ll sum=0;
Cout & lt; <"Both Please enter a number:";
Cin & gt;> i;
While (I) {
Sum=sum + I;
Cout & lt; <"The total of The Numbers which was inputed is:" & lt;Cout & lt; <"Both Please enter another number:";
Cin & gt;> i;
}
system("pause");
return 0;
}
CodePudding user response:
VS2015 compile operation, there is no problem, you saidCodePudding user response:
99.0 try you inputCodePudding user response:
Ok, no problem, got the wrong type, to define the two integers, change itCodePudding user response:
Because of you to the first cin is 90.0, actually I only read the 90 did not read. 0 then cin> cycle;> I read. Read and failure. 0 0 there has been a stream will be infinite