0

What is the output? 🤔

//Programa so koja se sobiraat broevite od 1 do 10 #include<iostream> using namespace std; int main() { int n=1; int zbir=0; do { zbir=zbir+n; //zbir+=n; n=n+1; //n+=1; } while (n<=10) cout<<"Zbirot na broevite od 1 do 10 e:"<<zbir<<endl; return 0; }

18th May 2020, 12:22 PM
Mihaela Trencheska
1 Respuesta
+ 1
the output is”Zbirot na broevite od 1 do 10 e:55” (by the way,do not forget ‘;’ after ‘while(n<=10)’)
19th May 2020, 6:35 AM
Zhengrong Yan
Zhengrong Yan - avatar