Computers and Technology

HURRY, HELP ME PLEASE In this lab, you complete a partially written C++ program that includes two functions that require a single parameter.
The program continuously prompts the user for an integer until the user enters 0. The program then passes the value to a function that computes the sum of all the whole numbers from 1 up to and including the entered number. Next, the program passes the value to another function that computes the product of all the whole numbers up to and including the entered number.

The given code is:
// SumAndProduct. cpp - This program computes sums and products
// Input: Interactive
// Output: Computed sum and product

#include
#include
void sums(int);
void products(int);
using namespace std;

int main()
{
double number;

cout << "Enter a positive integer or 0 to quit: ";
cin >> number;

while(number != 0)
{
// Call sums function here

// Call products function here

cout << "Enter a positive integer or 0 to quit: ";
cin >> number;
}
return 0;
} // End of main function

// Write sums function here

// Write products function here

WILL PICK BRAINLIEST for the fastest and most correct !!!

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, banna01man
You need a reliable network for about twenty-five computers that will be distributed across a large building. it is important that the network be relatively cheap. which topology should you use?
Answers: 1
image
Computers and Technology, 22.06.2019 15:00, mitchellk872
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
image
Computers and Technology, 22.06.2019 22:30, josephmelichar777
Write a full class definition for a class named player , and containing the following members: a data member name of type string .a data member score of type int .a member function called setname that accepts a parameter and assigns it to name . the function returns no value. a member function called setscore that accepts a parameter and assigns it to score . the function returns no value. a member function called getname that accepts no parameters and returns the value of name .a member function called getscore that accepts no parameters and returns the value of score .this is what i have, aparently this is wrong: class player{private: string name; int score; public: void player: : setname (string n){name =n; }void player: : setscore (int s){score = s; }string player: : getname (){return name; }int player: : getscore (){return score; }};
Answers: 2
image
Computers and Technology, 23.06.2019 13:00, dimondqueen511
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
Do you know the correct answer?
HURRY, HELP ME PLEASE In this lab, you complete a partially written C++ program that includes two...

Questions in other subjects:

Konu
Mathematics, 12.12.2020 16:50
Konu
Mathematics, 12.12.2020 16:50