• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
13 views

Problem:

write code that prints: numval ... 2 1 print a newline after each number. ex: numval = 3 outputs:

by (4k points)  
edited by

1 Answer

0 votes

Solution:

#include <stdio.h>

int main(void) {

 int inputNo;

 int i;

inputNo = 3;

for(i = inputNo; i >= 1; i--) {

 printf("%d\n", i);

 }

 return 0;

}

by (1.6k points)  
...