Friday, 21 February 2014

Write a C program to read an integers and print the multiplication table upto 10.

#include<stdio.h>
main()
{   
    int n,i=1;
    printf("\nEnter a number=");
    scanf("%d",&n);
    printf("\nThe multiplication table is\n");
    while(i<=10)
    {
        printf("\n%d x %d=%d",n,i,n*i);
        i++;
    }
}

No comments:

Post a Comment