Tuesday, January 4, 2011

PRINT SERIES (VARIABLE)

WAP TO PRINT SERIES FROM START TO END USING DO-WHILE LOOP
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 ();
}

No comments:

Post a Comment