Computer Science, asked by prachi111000, 1 month ago

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 sahil10august
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