+ 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;}

25th Dec 2019, 3:30 AM
Udeolisa Chukwudalu
Udeolisa Chukwudalu - avatar
1 Respuesta
+ 9
OUTPUT:. 1 2 3 4 5 total: 15
25th Dec 2019, 3:37 AM
ROHIT KANOJIYA
ROHIT KANOJIYA - avatar