0
Can somebody tell me what will this program give,i.e., what is its result?? { clrscr(); int a=5 ,count=0; cout<<"enter
{ clrscr(); int a,count=0; cout<<"enter your number"; cin>>a; while(a>0) { cout<<"please re-enter your number"; cin>>a; count=count+a; } cout<<count; getch(); }
3 Answers
+ 3
It takes inputs until you enter 0 (or a negative number, but you don't want to do that here), and then it displays their sum.
+ 1
Thanks, Zen.. You are the best.
- 1
it will give the error.