Popular Posts

6. Write a program using do while and show sum and I.

6. Write a program using do while and show sum and I.

#include
#include
int main()
{
clrscr();
int I,sum;
I=1;
Sum=0;
do
{
sum=sum+I;
I=I+2;
}
while(sum<40&&I<10);
cout<<"sum= "< getch();
return 0;
}

No comments: