Write a program in C to print series from start to end using do-while loop
#include <stdio.h>
void main ()
{
int a,b;
clrscr ();
printf ("Enter Start: ");
scanf ("%d",&a);
printf ("Enter End: ");
scanf ("%d",&b);
do
{
printf ("%d\n",a);
a++;
}
while (a<=b);
getch ();
}
Post a Comment