Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
Enjoy your coding thank you.....please follow me.
#include<stdio.h>
int main()
{
int i, X;
scanf("%d",&X);
for(i=1; i<=X; i++){
if(i%2 !=0)
printf("%d\n",i);
}
return 0;
}
Enjoy your coding thank you.....please follow me.
#include<stdio.h>
int main()
{
int i, X;
scanf("%d",&X);
for(i=1; i<=X; i++){
if(i%2 !=0)
printf("%d\n",i);
}
return 0;
}
No comments:
Post a Comment