Lecture 113
// Loop do while
#include <iostream>
#include <conio.h>
using namespace std;
main ()
{
int count,total;
count=0,total=0;
do
{
total=total+count;
cout<<"Count: "<<count<<" Total: "<<total<<endl;
count++;
}while(count<10);
getch();
return 0;
}
Code view in dev compiler:
Compile the program Ctrl+F9
Run program Ctrl+F10