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

Please help simplifying rational expressions by factoring (photo) Which expression is equivalent to O 1 X-4 X-4 1 -9x-4 O-9x-4 X-5 (x - 5)(x-4) K -?
If it starts to drizzle while you are driving, you should do which of the following? 1) Turn on your headlights and windshield wipers. 2) Slow down and increase
Summarize the motion of the projectile ball, including its horizontal and vertical motion.
Alcohol and other psychoactive drugs affect which parts of the brain?#1. primitive brain#2. reasoning center of the new brain#3. neocortex#4. old brainA. option
which fraction is equivalent to 2/6?
Folacin, Pteroylglutamine Acid, and Folate refer to: a) Minerals b) Vitamins c) Amino Acids d) Enzymes
Given `y=x^{2\ }\ -\ 6x\ -40\ ` 1. Get the factored form (x-r) (x-s)
NY-7.RP3 11) Janet hiked mile in hour. How fast did she hike, in miles per hour? 6
Suppose you discovered a new amino acid. Its R-group contains only hydrogen and carbon atoms. Predict the behavior of this amino acid. A)It is hydrophobic. B)It
how do you paraphrase information presented in a text