C Program to generate Multiplication Table
![Write a C Program to generate Multiplication Table Multiplication Table, C Program , Sumit Kar, Timusa Rak](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd7JUeFcGURR9T3358Yzicn60HdqsMSKqXUO3-Sxfx4K5Sqc7UgUwbzWzXCCtqRS4lZ_KrO_J8XbTe1fxRFzDQ-ZO_BYWAYQLuUNCKozi7hAbEpi0FGxITpJhJtEywftgs9V5CX1CA6O8a/s1600/c-programming-tutorial.jpg)
#include <stdio.h>
#include <conio.h>
#define ROWS 10
#define COLUMNS 10
void main()
{
int row, column, product[ROWS][COLUMNS] ;
int i, j ;
printf("\n MULTIPLICATION TABLE \n\n") ;
printf(" ") ;
for( j = 1 ; j <= COLUMNS ; j++ )
printf("%4d" , j ) ;
printf("\n") ;
printf("---------------------------------------------\n");
for( i = 0 ; i < ROWS ; i++ )
{
row = i + 1 ;
printf("%2d |", row) ;
for( j = 1 ; j <= COLUMNS ; j++ )
{
column = j ;
product[i][j] = row * column ;
printf("%4d", product[i][j] ) ;
}
printf("\n") ;
}
getch();
}
#include<stdio.h>
#include<conio.h>
int main()
{
int x=1,num,res;
printf("Enter Number : ");
scanf("%d",&num);
while(x<=10)
{
res=num*x;
printf("\n%d*%d=%d",num,x,res);
x++;
}
getch();
return 0;
}
Comments
Post a Comment