Tuesday, October 06, 2015

Write a program to display the multiplication table of 1 to 10 using do while loop.

Solution:-
   #include<stdio.h>
   #include<conio.h>
   void main( )
   {
            int row,col,table;
            clrscr( );
            printf("Multiplication table 1 to 10 \n");
            row=1;
            do
            {
                   col=1;
                   do
                   {
                            table=row*col;
                            printf("%d\t",table);
                            col ++ ;
                   }
                   while(col<=10);
                   printf("\n");
                   row ++ ;
            }
            while(row<=10);
            getch( );
   }