+ 4
What is the output of this code?
#include <iostream> using namespace std; int a=1; int total; int main() {while (a<6){cout<<a<<endl; total += a; a++;} cout<< "total:"<<total;}
1 ответ
+ 9
OUTPUT:.
1
2
3
4
5
total: 15
#include <iostream> using namespace std; int a=1; int total; int main() {while (a<6){cout<<a<<endl; total += a; a++;} cout<< "total:"<<total;}