0

#include <stdio.h>
int main (void)
{
int i=8,u=4;
int range;
printf("Enter Range to which you want to print series ");
scanf ( "%d",&range);
while (i<=range)
    {
printf("%d ",i);
if (i%2==0)
    {
    i=i+u;
    u++;
    }
else
    {
        u=7;
        i=i+u;
        u=4;
    }
    }
return 0;
}



Post a Comment

 
Top