All Questions Topic List
Others Questions
Previous in All Question Next in All Question
Previous in Others Next in Others
Question Number 85222 by Umar last updated on 20/Mar/20
InC++ Whatisthesectionsdoing?and Whatistheoutputfromthesections below? a.intp=o; for(inti=1;i<=30;i++){ if(i%5==0) p+=i; } cout<<p<<endl; b.intcount=2; intg=0; while(count<=50){ g=count; cout<<g<<endl; count+=2; } cout<<count<<endl;
Commented byUmar last updated on 20/Mar/20
pleasehelp
Commented bymr W last updated on 20/Mar/20
a. typohere: intp=0; itistocalculatethesumofall integersfrom1to30whichare divisibleby5. outputisp=105 b. itisjusttodisplaytheevenintegers from2to50,i.e.2,4,6,...,50.
thankyousomuchsir.
Terms of Service
Privacy Policy
Contact: info@tinkutara.com