#include <stdio.h>
// stdio.h means standard input and output file .header it is called as a library which store or tell compiler what type of input and output function is used such as printf(print output),scanf(take output from user)
int main() {
int num,index=0;//decleration + initialization//
printf("Enter a no\n") //\n is new line escape sequence//;
scanf("%d",&num); // %d is formate specifire and & is adress which is store variable value//
do{ //code to be executed//
printf("%d\n",index+5);//i+5//
index=index+5;
}while(index<num);//condition//
return 0;
}
#include <stdio.h>
int main() {
int num,index=0;
printf("Enter a no\n");
scanf("%d",&num);
do{
printf("%d\n",index+5);
index=index+5;
}while(index<num);
return 0;
}
No comments:
Post a Comment