programming-examples/c/Control_Statements/C Program to print 4 times table..c

26 lines
423 B
C
Raw Normal View History

2019-11-15 12:59:38 +01:00
/* Table of 4 - Program to print 4 times table */
#include <stdio.h>
#include <conio.h>
void main()
{
int i, n ;
clrscr() ;
printf("Enter the limit: ") ;
scanf("%d", &n) ;
printf("Four times table is as shown: \n") ;
for(i=1 ; i<=n ; i++)
printf("4 * %d = %d \n", i, 4*i ) ;
getch() ;
}
/*
Output :
Enter the limit: 3
Four times table is as shown:
4 * 1 = 4
4 * 2 = 8
4 * 3 = 12
*/