Wednesday, May 9, 2012

A program to print multiplication table from 1 to 10

#include <stdio.h>
#include <conio.h>

int main()
{
    int i,j;

    int array[10][10];
    
    for(i=0; i<10; i++)
    {
        for(j=0; j<10; j++)
        {
            array[i][j] = (i+1)*(j+1);
        }               
    }
    
    for(i=0; i<10; i++)
    {
        for(j=0; j<10; j++)
        {   
            printf("%3d ",array[i][j]);
        }
        printf("\n");
    } 
}

No comments:

Post a Comment