//Write a program to print 4,7,10,13,.........less than 50 using while looping #include<stdio.h> #include<conio.h> void main() { int x=4;//set x= 4 because according to question, we have to start from 4 clrscr(); while(x<50) //run the loop while x is less than 50 { printf("%d\n",x); x=x+3;//because 7-4=3, 10-7=3, 13-10=3,..... } getch(); }
Comments
Post a Comment