C program to print all the numbers between A and B
#include<stdio.h>
void main()
{
int num,a,b;
clrscr();
printf ("Enter range (a,b) : ") ;
scanf ("%d %d", &a, &b);
for (num = a; num <= b; num++)
{
printf("%d ", num);
}
getch();
}
No comments:
Post a Comment