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

1. Mei Mei was knocked down by a lorry ________ she was not seriously injured. (A) if (B) so (C) but (D) and ​
If p(x) = x2 - 1 and 9(x) = 5(x - 1), which expression is equivalent to (0-9)(x)? 5(x - 1) - x2 - 1 (5x-1) - (x² - 1) (x2 - 1) - 5(x - 1) (x2 - 1) - 5x-1
if johnny had 6 apples and ava took 3 how many would she have left
The nucleus includes all of the following structures EXCEPT a cytoplasm. b a nuclear envelope. c DNA. d a nucleolus.
Idk this question and I need help
Please HELP me, this is physics
Round 47,250 to nearest ten thousand
What was one function of the great cathedrals during the Middle Ages? provide a sanctuary for the priests serve as a symbol of authority help people endure the
renee used the values in the table to calculate simple interest 00.5 0.5 5% 50%
f(x)=^3 4x g(x)=2x+3 find(f/g) (x). Include any restrictions on the domain.​