---------------------------------------------
/*Program to print table of all odd numbers less than 10. Useing flowcontrol
terms Break & Continue. */
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
cout<<"\nOdd Number Table:";
for(a=1;;a++)
{
if(a>=10)
{ break;
}
else
if(a%2==0)
{continue;
}
else
{
cout<<"Table for "<<a<<" :";
for(b=1;b<=10;b++)
{
cout<<" "<<b*a;
}
}
cout<<"\n";
}
getch();
}
No comments:
Post a Comment