subject

Write a function so that the main() code below can be replaced by the simpler code that calls function original main():

int main() {
double milesperhour;
double minutestraveled;
double hourstraveled;
double milestraveled;

cin > > milesperhour;
cin > > minutestraveled;

hourstraveled = minutestraveled / 60.0;
milestraveled = hourstraveled * milesperhour;
cout < < "miles: " < < milestraveled < < endl; return 0;
}
#include
using namespace std;
// write your answer here.
int main() {
double milesperhour;
double minutestraveled;

cin > > milesperhour;
cin > > minutestraveled;

cout < < "miles: " < < mphandminutestomiles(milesperhour, minutestraveled) < < endl;
return 0;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
In this lab, you add a loop and the statements that make up the loop body to a c++ program that is provided. when completed, the program should calculate two totals: the number of left-handed people and the number of right-handed people in your class. your loop should execute until the user enters the character x instead of l for left-handed or r for right-handed. the inputs for this program are as follows: r, r, r, l, l, l, r, l, r, r, l, x variables have been declared for you, and the input and output statements have been written.
Answers: 3
question
Computers and Technology, 23.06.2019 16:00
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
question
Computers and Technology, 24.06.2019 07:00
Into what form does the barcode reader convert individual bar patterns?
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex: if userinput is "that darn cat.", then output is: censoredex: if userinput is "dang, that was scary! ", then output is: dang, that was scary! note: if the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "program end never reached." the system doesn't print the test case that caused the reported message.#include #include using namespace std; int main() {string userinput; getline(cin, userinput); int ispresent = userinput.find("darn"); if (ispresent > 0){cout < < "censored" < < endl; /* your solution goes here */return 0; }
Answers: 3
You know the right answer?
Write a function so that the main() code below can be replaced by the simpler code that calls functi...
Questions
question
Mathematics, 03.07.2019 22:10
question
English, 03.07.2019 22:10