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