Computer Science, asked by vageesha89, 11 months ago

write a program in C to find the odd numbers between 1 to 30​

Answers

Answered by Anonymous
1

#include <stdio.h>  

 

int main() {  

   int i;

   for(i = 1; i<= 30; i++) {  

       if(i%2 == 1) {

           printf("%d ", i);  

       }  

   }  

 

   return 0;  

}

Output:

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29

Similar questions