63.6k views
0 votes
C program To print odd numbers from 15 to 1 ​

User Rob Heiser
by
6.1k points

2 Answers

6 votes

#include <stdio.h>

int main(int counter) {

printf("Odd numbers between 15 to 1:\\");

// Set the counter to 15 at the beginning and decrease it after each cycle.

// Check each counter value to see if it is an odd number, and print the result accordingly.

for(counter = 15; counter > 0; counter--) {

if(counter % 2 == 1) {

printf("%d ", counter);

}

}

return 0;

}

C program To print odd numbers from 15 to 1 ​-example-1
User Krishna Vedula
by
6.1k points
3 votes

Answer:true

Step-by-step explanation:

This statement is correct

User Apurvc
by
6.7k points