Thursday, 31 March 2016

Program to print table from 1 to 9 using for loop in c++ language.

Wap to print table from 1 to 9 using for loop in c++ language.









Coding:


#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();

int i,j,k;
for(i=1;i<=9;i++)
{
for(j=1;j<=10;j++)
{
k=i*j;
cout<<k<<" ";
}
cout<<"\n";
}getch();
}

Output:
 

No comments:

Post a Comment