1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vladimir [108]
3 years ago
10

Write code that prints: Ready! firstNumber ... 2 1 Run! Your code should contain a for loop. Print a newline after each number a

nd after each line of text Ex: firstNumber
Computers and Technology
1 answer:
Citrus2011 [14]3 years ago
5 0

Answer:

The program to this question can be describes as follows:

Program:

#include <stdio.h> //defining header file

int main() //defining main method

{

int n,i,x=0; //defining integer variable

printf("Enter a number: "); //print message

scanf("%d",&n); //input value from the user  

printf("%d\n",n); //print input value

for(i=1;i<n;i++)  //loop to count reverse number

{

x=n-i; //calculate value

printf("%d\n",x);  //print value

}

return 0;

}

Output:

Enter a number: 3

3

2

1

Explanation:

  • In the above program, three integer variable "n,i and x" is declared, in which variable n we take input from the user end and the variable i and x is used in the loop to calculate the value in the reverse order.
  • In the next step, a loop is declared, in which the variable x calculates the value in reverse order and uses a print method to print its value.  
You might be interested in
What was the first car ever produced by Henry ford
Slav-nsk [51]

It was "The Henry Ford"

6 0
3 years ago
The size of an array (how many elements it contains), which is accessed by .Lenth() returns (Choose the best answer)
Wewaii [24]

Answer:that creates the array, puts some values in it, and displays the values. ... assign a value to each array element and print for (int i = 0; i < anArray.length; i++) ... Array; Array Initializers; Accessing an Array Element; Getting the Size of an Array ... not create an array and does not allocate any memory to contain array elements.

Explanation:

5 0
3 years ago
A Function checkMe takes three parameters, a character and two integers. If the sum of the two integers is negative, and the cha
Paul [167]

Answer:

Check the explanation

Explanation:

Here is the program with function definition and two sample calls.

Code:

#include <iostream>

using namespace std;

//checkMe FUNCTION which takes values a, b and c

void checkMe(char &a, int &b, int &c)

{

//if sum of b and c is negative and a is 'n', b and c are set to 0, otherwise a is set to 'p'

if((b+c)<0 && a=='n')

{

b = 0;

c = 0;

}

else

{

a = 'p';

}

}

int main()

{

//first test case when else part is executed

char a = 'n';

int b = 5;

int c = 6;

 

checkMe(a, b, c);

 

cout<<a<<" "<<b<<" "<<c<<endl;

 

//second test case when if part is executed

a = 'n';

b = -4;

c = -5;

 

checkMe(a, b, c);

 

cout<<a<<" "<<b<<" "<<c<<endl;

return 0;

}

Kindly check the Output below:

7 0
2 years ago
What are the events?
erastovalidia [21]

Answer:

a thing that happens or takes place, especially one of importance.

8 0
2 years ago
The program requires the age to be between 0 and 8.
yaroslaw [1]

Answer:

b

Explanation:

5 0
2 years ago
Other questions:
  • While building a high-end gaming system, you are attempting to install the EVGA GeForce GTX 1080 graphics card and discover ther
    9·1 answer
  • Let's say you're creating a search stream in your hootsuite dashboard, to find mentions of the phrase vacation holiday getaway.
    15·1 answer
  • Help with some questions. Thank you!
    14·1 answer
  • What is the purpose of system calls, and how do system calls relate to the OS and to the concept of dual-mode (kernel-mode and u
    14·1 answer
  • How does the purchase of office equipment on account affect the accounting equation?
    11·2 answers
  • The Turing test consists of a person asking written questions of a person and a computer. If the questioner can't tell which one
    13·1 answer
  • As an improvement of the ATX form factor over AT, shorter wires made it easier to shield them and made them capable of handling
    6·1 answer
  • If two egg cells are fertilized what will happen?
    10·1 answer
  • A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output i
    14·1 answer
  • True or False(T or F): Point-and-shoot cameras have only 1 lens. *
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!