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

How are the GCF and the LCM alike?
Audrey has $120 to spend on a tennis racket and lessons.The racket costs $45 and lessons cost $15 per hour. Define a variable.Then write and solve an equation t
Hi Can Someone Please Explain How To Work This Out?!Thank you xxx
selodaha setahay in english
Prove right triangle are congruent with given hypotenuse.
what is the complete patter? 0.02 0.2 _________ 20 _________ ____________
A car rental company charges a daily rate of 23$ plus $0.30 per mile for a certain car. Suppose that you rent a car for a day and your bill (before taxes) is $1
Which equations could model this problem? A package of 12 cans of dog food costs $33. What is the unit price d per can of dog food? Choose all answers that are
The time is 610 is the hour hand closer to 6 or 7 why
Find the logarithm of (95.32/8.971)squared