Tuesday, 30 June 2015

Program 1 : Write a program to display multiplication table.

#include<stdio.h>

void main() {

    int n, i;

    printf("Enter an integer to find multiplication table:");

    scanf("%d",&n);

    for (i = 1; i <= 10; ++i) {

        printf("%d * %d = %d\n", n, i, n * i);

    }

}


No comments:

Post a Comment