To print the table of given number.
Program:
#include<stdio.h>
#include<conio.h>
void main()
{
int i,a,b; //Declaring Variable.
printf("Enter the Table number"); //For printing
printf("Till where you want to print the table"); //For printing
for(i=1;i<=b;i++) //for loop
printf("\n %d*%d = %d",a,i,a*i); //For printing
getch(); //Getting a character or waiting for key press
void main()
{
int i,a,b; //Declaring Variable.
printf("Enter the Table number"); //For printing
scanf("%d",&a); //For Input.
printf("Till where you want to print the table"); //For printing
scanf("%d",&b); //For Input.
for(i=1;i<=b;i++) //for loop
printf("\n %d*%d = %d",a,i,a*i); //For printing
getch(); //Getting a character or waiting for key press
}
No comments:
Post a Comment