Pages

Monday, January 2, 2012

C Programming to display multiplication table using while loop


/*to display multiplication table using while loop*/
#include<stdio.h>
#include<stdlib.h>
int main( )
{
    int i,n;
    printf ("enter number: ");
    scanf ("%d",&n);
    i=1;
    while (i<=10)
    {
        printf ("\n%dx%d=%d",n,i,n*i);
        i++;
    }
    system ("pause");
    return 0;
}

No comments:

Post a Comment