Tuesday, December 6, 2011

Write a C program to "multiply of 5 of a range of number"

//If limit is 2 then output will 5*1=5 \n 5*2=10

#include <stdio.h>
#include <conio.h>
void main()
{
 int n,i,m;
 clrscr();
 printf("Enter limitation of this calculation: ");
 scanf("%d",&n);
 for(i=0;n>=i;i++)
 {
  m=5*i;
  printf("5*%d=%d\n",i,m);
 }
 getch();
}

No comments:

Post a Comment