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

Describe how to determine wether or not an atom is boron
20pts! Alex slides a 170 g hockey puck across a sheet of ice. The coefficient of kinetic friction between the puck and the ice is 0.09. What is the puck's rate
5 customers entered a store over the course of 3 minutes. At what rate were the customers entering the store in customers per minute?
characters Mr. Easton and the Marshal in 0. Henry's "Hearts and Hands."
The distance in meters, d, that Josefina walks over time in minutes, t, is given by this equation. d = 100t How many meters does Josefina walk per minute?
According to the political cartoon, what was the role of President Gerald Ford?
sorry this is hard haha :(
Write the equation of the line tangent to the graph at the given point. F(x) = (x-1)(x^2 -2) at (0,2)
As water flows from a low elevation to a higher elevation through a circular pipe. The diameter of the pipe at the low elevation is 5.0 cm, and that at the high
What mood does the metaphor "the bright day of justice emerges" create in this speech?