Lecture 86
// Loop While
#include <iostream>
#include <conio.h>
using namespace std;
main ()
{
int i;
cout<<"Odd number: ";
i=1;
while(i<10)
{
cout<<i<<" ";
i+=2;
}
getch();
return 0;
}
Code view in dev compiler:
Compile the program Ctrl+F9
Run program Ctrl+F10