Tuesday, 31 December 2013

PROGRAM TO PRINT A TABLE USING FOR LOOP...!!!

#include<stdio.h>
int main()
{
    int table,x;
    printf("Enter the number to print table:");
    scanf("%d",&table);
    for(x=1;x<=10;x++)
    {
        printf("%d X %d = %d\n",table,x,x*table);
    }
    getch();
    return 0;
}

Expected Output: 





No comments:

Post a Comment