4G l 19% of hours wo 22:52 MTN SA 39B/s nu The average number of hours...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
4G l 19% of hours wo 22:52 MTN SA 39B/s nu The average number of hours per day spent programming by student 1 is 5 Please enter the number of hours worked by student 2 on day 1 9 hours worked by student 2 on Please enter COS1511_103 2... 13 The ave mming by stunt 2 is QUESTION 3b Modify question3.cpp so that it also finds the average number of hours per day that a given student studies biology as well as programming. For each given student include two prompts, one for each subject. Have the program display which subject the student, on average, spend the most time on. (15 marks) Submit: question3.cpp output QUESTION 4: VOID FUNCTIONS A function named printTabs (with no parameters) produces a table as the numbers 1 to 10, their squares and their cubes as shown below. NUMBER SQUARE CUBE 1 1 1 2 CO 4 9 27 4 16 36 25 125 6 36 216 7 49 343 8 64 512 81 729 1000 10 100 6 COS1511/103/2/2019 QUESTION 4a Write the function printTabs. Include the function in a working program named question4.cpp and call function print Tabs from main ) QUESTION 4b Modify program question4.cpp by adding a function selTabs to accept the starting value of the table, the number of values to be displayed, and the increment between the values. If the increment is not explicitly sent, the function should use a default value of 1. A call to selTabs (6,5,2) should produce a table of five lines, the first line starting with number 6 and each succeeding number increasing by 2 A sample run: Enter the starting value of the table 6 Enter the number of values to be displayed Enter the increment between the values 2 NUMBER SQUARE CUBE 6 36 216 46 512 1000 10 100 144 12 729 14 100 1000 4G l 19% of hours wo 22:52 MTN SA 39B/s nu The average number of hours per day spent programming by student 1 is 5 Please enter the number of hours worked by student 2 on day 1 9 hours worked by student 2 on Please enter COS1511_103 2... 13 The ave mming by stunt 2 is QUESTION 3b Modify question3.cpp so that it also finds the average number of hours per day that a given student studies biology as well as programming. For each given student include two prompts, one for each subject. Have the program display which subject the student, on average, spend the most time on. (15 marks) Submit: question3.cpp output QUESTION 4: VOID FUNCTIONS A function named printTabs (with no parameters) produces a table as the numbers 1 to 10, their squares and their cubes as shown below. NUMBER SQUARE CUBE 1 1 1 2 CO 4 9 27 4 16 36 25 125 6 36 216 7 49 343 8 64 512 81 729 1000 10 100 6 COS1511/103/2/2019 QUESTION 4a Write the function printTabs. Include the function in a working program named question4.cpp and call function print Tabs from main ) QUESTION 4b Modify program question4.cpp by adding a function selTabs to accept the starting value of the table, the number of values to be displayed, and the increment between the values. If the increment is not explicitly sent, the function should use a default value of 1. A call to selTabs (6,5,2) should produce a table of five lines, the first line starting with number 6 and each succeeding number increasing by 2 A sample run: Enter the starting value of the table 6 Enter the number of values to be displayed Enter the increment between the values 2 NUMBER SQUARE CUBE 6 36 216 46 512 1000 10 100 144 12 729 14 100 1000
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
//Question3.cpp // This program finds the average time spent programming by a student // each day over a three day period. #include using namespace std; int main() { int n; int numStudents; float...
-
The table here shows the average number of births per day in the United States as reported by the CDC (Centers for Disease Control). Based on this information, what is the probability that one baby...
-
The following data represent the average number of hours per week that a random sample of 40 college students spend online. The data are based on the ECAR Study of Undergraduate Students and...
-
A Canadian packaging company wished to extend its activities in the area of convenience foods. It had pinpointed one particular area where it could supply pizza boxes to half a dozen chains of pizza...
-
Auditors use a technique called discovery sampling in which a random sample of items is inspected. If any defects are found, the entire lot of items sampled is subjected to 100 percent inspection. a....
-
How do basic feelings differ from higher-level feelings?
-
A university pumps its water from wells located on campus. The falling water table has caused pumping costs to increase, the quantity of water available to decrease, and the quality of water to...
-
Sprinkle Inc. has outstanding 10,000 shares of $10 par value common stock. On July 1, 2010, Sprinkle reacquired 100 shares at $87 per share. On September 1, Sprinkle reissued 60 shares at $90 per...
-
A. Based on this topology, what is the NTP level at SW2? Fa0/24 2960-24TT SW1 Internet Fa0/1 3 192.168.123.0/24 Server-PT pool.ntp.org 146.105.130.223 2 Fa0/24 2960-24TT SW2
-
Refer to Exercise 13-4. Using the same information, assume that the Brazilian real is identified as the functional currency of the subsidiary. Required: A. Remeasure the account balances that are...
-
QUESTION ONE (a) Sibongile is an Accountant with a manufacturing company. She has decided to retire on 31/12/2023 after successfully serving her three year contract. Below are her entitlements: (i)...
-
For a law firm, the wages and salaries of the employees are placed in which budget?
-
7 (a) Convert radians to degree measure. 4 (b) Convert 150 to radian measure in terms of . radians
-
Identify Stephen's and Madeline's current insurance cover. Identify whether each policy's premiums are deductible and whether the proceeds from each of the policies are assessable and at what rate.
-
If a buyer puts 20% down and borrows $200,000, what is the purchase price of her new home?
-
In what ways does effective communication play a pivotal role in facilitating seamless collaboration amongst disparate teams?
-
If the jobs displayed in Table 18.24 are processed using the earliestdue-date rule, what would be the lateness of job C? TABLE 18.24 Processing Times and Due Dates for Five Jobs Job C D E...
-
A binomial probability experiment is conducted with the given parameters. Compute the probability of x successes in the n independent trials of the experiment. n = 12, p = 0.35, x 4
-
The American black bear (Ursus americanus) is one of eight bear species in the world. It is the smallest North American bear and the most common bear species on the planet. In 1969, Dr. Michael R....
-
(a) Determine the critical value for a right-tailed test of a population mean at the = 0.01 level of signicance with 15 degrees of freedom. (b) Determine the critical value for a left-tailed test of...
-
Evaluate the following drafts. What parts should be omitted? What needs to be changed or added? What parts would benefit from specific supporting details? 1. Dear_ There is more to a buyer's job than...
-
Use five different websites to investigate three companies in your career field. Look at salary guides for your level of qualifications, product/service information, news articles about the...
-
Interview someone working in a field youre interested in. Use the following questions to get started: How did you get started in this field? What do you like about your job? What do you dislike...
Study smarter with the SolutionInn App