1) Print even number 0 to 30 what will be the program
2) Print odd number from 1 to 50 . What will be the program
3) Print multiple of 3 from 1 to 20 odd no.
Please tell me the program
ex : For i =
Print
next i
end
after this solution
ex: step + 2
1+2 =
like this
Answers
Answered by
1
1.) #include <stdio.h>
int main()
{
int n;
printf("Even No from 0 to 30 are \n");
for(n=0;n<=30;n++)
if(n%2==0)
printf("\t%d",n);
return 0;
}
2.) #include <stdio.h>
int main()
{
int n;
printf("Odd No from 0 to 30 are \n");
for(n=0;n<=50;n++)
if(n%2!=0)
printf("\t%d",n);
return 0;
}
3.) #include <stdio.h>
int main()
{
int n;
printf("Odd No from 0 to 30 are \n");
for(n=0;n<=20;n++)
printf("\t%d",n*3);
return 0;
}
Hope it is helpful for you
Similar questions
India Languages,
1 month ago
English,
1 month ago
Math,
3 months ago
Math,
9 months ago
Biology,
9 months ago