c programming Write code that prints: Ready! countNum ... 2 1 Go! Your code should contain a for loop. Print a newline after each number and after each line of text Ex: countNum = 3 outputs: Ready! 3 2 1 Go! 1 2 3 4 5 6 7 8 9 10 11 12 13 #include int main(void) { int countNum; int i; countNum = 3; /* Your solution goes here */ return 0; } 1 2 3 4 5 Check Next

Answer :

Answer:see explanation

Explanation:

Hello, from your question I see that you need a program which based on countNum's value prints ready then all the numbers to 1 and finally go!, I'd appreciate if you provided information about the numbers after the example you gave as I do not know if they are to be printed too.

The solution I provide includes the countdown to 1 printing newline after each number and text. Try it out!

#include <stdio.h>

int main(void)

{

   int countNum;

   int i;

   countNum = 22;

   for ( i = countNum; i > 0; i--) {

       if (i == countNum){

           printf("Ready!\n");

       }

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

   }

   printf("Go!\n");

   return 0;

}

Other Questions