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

Write the pair of fractions as a pair of fractions with a common denominator 1/3 and 3/4
Calculate 5^ 2039(mod 41)
What four european countries were most involed in eploring and discovering new lands?
two people are scuba diving. one diver is 52 feet below the surface. the other is 44 feet below the surface. what integer represents where the divers are with r
What a corpse looks like after being burried 12 years?
factor of 42a5b3, 35a3b4, and 42ab4
What is the difference between july in mexico and in argentina?
If i is raised to an even power, then it can not simplify to be
When the coffee is brewed according to directions, a pound of coffee beans yields 50 cups of coffee (4 cups = 1 qt). How many kg of coffee are required to produ
In "nefarious war" what do these walls built against the tartars refer to? a.the tower of babel b.the ming dynasty c.the great wall of china d.none of the a