NOTE: Not by using arrays.
write a C++ function. in which A college offers a course that prepares students for the state licensing exam for real estate brokers.
Last year, ten of the students who completed this course took the exam. The college wants to know
how well its students did on the exam. You have been asked to write a program to summarize the
results. You have been given a list of these 10 students. Next to each name is written a 1 if the
student passed the exam or a 2 if the student failed.
Your program should analyze the results of the exam as follows:
Input each test result (i.e., a 1 or a 2). Display the prompting message "Enter result" each time the
program requests another test result.
Count the number of test results of each type.
Display a summary of the test results indicating the number of students who passed and the
number who failed.
If more than eight students passed the exam, print the message "Raise tuition." write code in function not by using arrays
Write a program to print the following output,
Sample Input1
2
5
1 2 3 4 5
6
2 20 3 30 4 40
Sample Output1
33
201
Design a flowchart for a program that accepts a unit price and quantity of items sold and displays total amount and VAT. (Note: Unit price is VAT exclusive. VAT rate is 16.5%.).
Write a C++ program that prompts the user for the fuel quantity and the fuel price per litre. The program should then print a fuel receipt like the one below: Receipt ======= Volume: 15.50 L Litre Price: MK 1380.50/L ------------ To be Paid: MK 21,397.75 ***End of receipt**
Write a C++ program to enter a number represents a person age then display the
following on a message boxes:
1. "Wrong age" if the age less than or equal to 0 years.
2. "Child" if the age less than 8 years.
3. "Boy" if the age greater than or equal to 8 years.
4. "Young" if the age greater than or equal to 18 years.
5. "Old" if the age greater than or equal to 35 years.
6. "Very Old" if the age greater than or equal to 65 years.
Write a python statement that assigns the sum of 10 and 14 to the variable total
Using three dimensional array, create a program that will enter table, row, and column together with the total number of Elements then display the Biggest number, Smallest number, and Second to the biggest number.
Sample input and output:
Input:
Enter number of Tables: 2
Enter number of Rows: 2
Enter number of Columns: 2
Enter 8 number of Elements
2
6
34
76
34
98
56
45
The biggest number among them is: 98
The smallest number among them is: 2
The second to the biggest number is: 76
c) Write a method DisplayDecision that takes as input two marks, one for WRAV101 and one
for WRSC111. Each of these marks is in the range 0 to 100. If the student can continue with
the second semester modules (use CanContinue above), an appropriate message and the
average mark for the two modules is displayed, otherwise the student is informed that he may
not continue.
d) Now, write the main program that continuously does the following for any number of students
until the lecturer requests to terminate the process:
Ask for the WRAV101 and WRSC111 marks and display a message to indicate whether
the student can continue with second semester modules or not.
Get a number n from a user. Generate n random numbers and store in the list. Display the list. Compute summation and average of all numbers in the list then display the result on screen.
4. The Litsemba Life Insurance company computes annual policy premiums based on the age the customer turns in the calendar year. The premium is computed by taking the decade of the customer's age, adding 15 to it, and multiplying by 20. Write a Java application that prompts the user for the current year and birth year. Pass both to method that calculates and returns the premium amount and display the returned amount. Application should be saved as Insurance.java . Note: the customer age should not be more than 59 years. [10 Marks]