Ask Question
9 August, 14:55

Write code that prints: Ready! numVal ... 2 1 Start! Your code should contain a for loop. Print a newline after each number and after each line of text Ex: numVal = 3 outputs: Ready! 3 2 1 Start!

+4
Answers (1)
  1. 9 August, 18:38
    0
    Code to this question can be described as follows:

    Program:

    #include / /defining header file

    using namespace std;

    int main () / /defining main method

    {

    int n1, j, x1=0; / /defining integer variable

    cout<<"Enter a number: "; / /print message

    cin>>n1; / /input value from the user

    cout<
    for (j=1; j
    {

    x1=n1-j; / /calculate value

    cout<
    }

    return 0;

    }

    Output:

    Enter a number: 3

    3

    2

    1

    Explanation:

    In the above C+ + language program, three integer variable "n1, j and x1" is declared, in which variable n1 take input from the user end and the variable j and x1 are used in the loop to calculate the value in the reverse order. In the next step, a for loop is declared, in which the variable x1 calculates the value in reverse order and uses a print method to print its value.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write code that prints: Ready! numVal ... 2 1 Start! Your code should contain a for loop. Print a newline after each number and after each ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers