krysycakes8556 krysycakes8556
  • 14-01-2021
  • Computers and Technology
contestada

Write code that outputs variable numDays as follows. End with a newline. If input is 3, output is: Days: 3

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 14-01-2021

Answer:

In C++:

#include<iostream>

using namespace std;

int main(){

int numDays;

cin>>numDays;

cout<<"Days: "<<numDays<<endl;

return 0;

}

Explanation:

This line declares numDays as integer

int numDays;

This line gets user input for numDays

cin>>numDays;

This line prints the required output and ends with a newline

cout<<"Days: "<<numDays<<endl;

Answer Link

Otras preguntas

From the figure below, the coordinates for point T are: PLS HELP
How many 25cm pieces of wires canbe cut out from a wire of length 4metres?​
Dina invests £450 in a savings account with annual compound interest. After five years, there is £534.46 in the account. What interest rate has she been receivi
From the stories "The Absolutely True Diary of a Part-Time Indian" and “The Building", How does the characterization of Junior and Leslie compare in both texts?
What logarithm is equal to Mlog58?
If f(x) = (2x^3 − 4)^6, then what is f '(x)? 21x^2(x^3 − 4)^5 21x^8 6(2x^3 − 4)^5 6(2x^3 − 4)^5(6x^2)
7 times 10 to the -7 power
The following expression is a perfect square. Find the third term.49y2 + 42y+​
What is one downside of ultrasound? a. Claustrophobia b. Dangerous magnetic fields c. High radiation doses d. Low resolution
write a story that ends with the word "where there is a will there is a way"​