CTRL + z usage
# Include <iostream> using namespace STD; Main () {int num, sum = 0; while (CIN> num) {sum + = num ;} cout <"and" <sum <Endl ;}View code
# Include <iostream> using namespace STD;
Main ()
{
Int num, sum = 0;
While (CIN> num)
{
Sum + = num;
}
Cout <"and <sum <Endl;
}
**************************************** **************************************** **************************************** *************
End with 0
# Include <iostream> using namespace STD; Main () {int num, sum = 0; while (CIN> Num, num) {sum + = num ;} cout <"and" <sum <Endl ;}View code
# Include <iostream>
Using namespace STD;
Main ()
{
Int num, sum = 0;
While (CIN> Num, num)
{
Sum + = num;
}
Cout <"and <sum <Endl;
}
**************************************** **************************************** **************************************** **********************
End #
# Include <iostream> using namespace STD; Main () {int num, sum = 0; while (CIN> num & num! = '#') {Sum + = num;} cout <"and <sum <Endl ;}View code
# Include <iostream>
Using namespace STD;
Main ()
{
Int num, sum = 0;
While (CIN> num & num! = '#')
{
Sum + = num;
}
Cout <"and <sum <Endl;
}
**************************************** **************************************** **************************************** ****
# Include <iostream> using namespace STD; Main () {int N, num, sum = 0; CIN> N; while (n --) {CIN> num; sum + = num;} cout <"and <sum <Endl ;}View code
# Include <iostream>
Using namespace STD;
Main (){
Int N, num, sum = 0;
Cin> N;
While (n --)
{
Cin> num;
Sum + = num;
}
Cout <"and <sum <Endl;
}
# Include <iostream> using namespace STD; Main () {int I, n, num, sum = 0; CIN> N; for (I = 0; I <N; I ++) {CIN> num; sum + = num;} cout <"and <sum <Endl ;}View code
# Include <iostream>
Using namespace STD;
Main ()
{
Int I, n, num, sum = 0;
Cin> N;
For (I = 0; I <n; I ++)
{
Cin> num;
Sum + = num;
}
Cout <"and <sum <Endl;
}
**************************************** **************************************** **************************************** *************************