Computer for SEE and NEB

It is a complete SEE and NEB solution for computer science. It includes Computer Fundamentals, Database (SQL), Programming in C QBASIC, CSS, JavaScript, and PHP for beginners.

Breaking

Post Top Ad

Your Ad Spot

Friday, September 30, 2022

C program to display the multiplication table of input number using function.

C program to display the multiplication table of input number using function.


#include<stdio.h>  

void tab(int);  

int main()  

{  

    int n;  

    printf("Enter any number\n");  

    scanf("%d", &n);  

    printf("\nMultiplication Table of %d is:\n", n);  

    tab(n);  

    return 0;  

}  

  

void tab(int num)  

{  

    int x;  

    for(x = 1; x <= 10; x++)  

    {  

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

    }  

}


Output:



You may also like:

C program to display the multiplication table of input number using function.

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages