Use a double-subscripted array to solve the following problem. A company has four salespeople ( 1 to 4) who sell five different products ( 1 to 5). Once a day, each salesperson passes in a slip for each different type of product sold. Each slip contains: a) The salesperson number b) The product number c) The total dollar value of that product sold that day Assume that the information from all the slips for a day is available. Write a program that will read all this information for the day and store in a double-subscripted array sales. For each product find and display the total sales.
A student did 8 units in an exam and got different marks in each of the exam papers. He intends to calculate his total, mean score and exams decision for the exams using a program written in C++.
i. Assign 8 scores to the student in a one-dimensional array.
ii. Declare a function that takes an array of the student’s scores as a parameter and calculates both the total and the mean score.
iii. Pass the mean score from (ii) above into another function by reference, that computes whether the student has passed or not given that a pass is 50 – 100 while a fail is 0 – 49.99
Write a C++ program that will compute the above.
The BMI (Body Mass Index) is calculated using height (measured in meters) and weight (measured in
Kg) of a person. A person with BMI of 25.0 or more is considered overweight, while the
healthy/normal range is 18.5 to 24.9 and a person with BMI less than 18.5 is considered underweight.
draw flowchart of this statement
Write run a program in C/C++ to simulate the behavior of Aloha random access protocol and
show the output.
You are required to the following tasks:
• Generate packets randomly
• Simulate transfer of packets at a random time
• Simulate the occurrence of collision of packets
• Calculate throughput of Aloha
• Plot throughput Vs Load graph
Write a C++ one dimensional array program that prompts and reads in the sales for each salespeople(number of salespeople are 5 and each salespeople name should be stored) for each category(viz.. Living,bed,dining,office,decor) in a company. Then prints out the salespeople's name and amount of sales for each category and their respective total sales.
a. Each salespeople's total sale should be stored and cumulatively added everytime the program runs.
b. also overall sale(sum of every salespeople's total sales) should be displayed and stored and should also be cumulatively added everytime the program runs.
Create a program that will read the values of A and B. Compare the two values of A & B then print which of the values is higher including the remark "Higher".
Write a C program that would prompt a user to enter weight of five people and store the values in an array. The program the computes and outputs the total weight.
Create a console application which can be used to read in and do some calculations on marks.
Open the file Marks.dat, review this file and take note of the following:
Each line of the file is representing the details for a specific student, namely: student number, name, quiz average, prac average and test mark
Your application should read in the details from the file, create a student object for each student and add the objects to a list of students
Write a CGPA class that has a constructor for initializing four variables: name, matric number, level, and course of study, The program should have two other overloaded methods, one for collecting the credit unit of each course and the other for collecting points based on the grades of each student in each of the courses. Write a third method for calculating the CGPA of a number of students and return the names, matric numbers, levels, course of study, and their current CGPA, well-arranged (using format specifier if necessary). Execute the program using 5 records. Turn in the codes and a snapshot of the result on google classroom.
Let us now try comparing two numbers by letting the user input two different numbers and say "Greater" if the first inputted number is greater than the second one, and "Lesser" if it’s the other way around.
Let's go!
Input
A line containing two different numbers separated by a space.
1.2·1.02
Output
A line containing a string.
Greater