Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Amjad reached Emporium with his family. They are all excited since he successfully passed his test for BSCS admission and now, they are here to celebrate. All the family members are interested in watching the movie while having popcorn. You must ask Amjad the number of people with him. Emporium Cinema is offering different type of tickets for the film: [Student (S) 250, Normal (N) 400, and Executive (E) 750]. Any choice other than mentioned is considered as invalid input. Ask them what ticket choice will they prefer. Before the start of the film, all the family members decide to have popcorn also. Popcorn stall is offering three different flavors. [Simple (S) 100, Tacos (T) 150, and Caramel (C) 200]. Any choice other than mentioned is considered as invalid input. Ask them what popcorn choice will they prefer.


Calculate and print the amount used for the film and popcorn separately and the total expense at the end. Your solution should show proper menu-based system.

Write a C++ program that reads in the radius of a Sphere, then calculates and prints its volume and surface area. 


Write a C++ program that inputs three integers from the user and prints the smallest and largest of these numbers.


• Two threads –



• Both threads will sleep for 1 second before reading from the global array of strings

Create a program that will ask the user to input Month Day and Year, the program will output the day and the date.


Sample Output:


Month: 5

Day:  20

Year: 2022


Friday, May, 20, 2022


Create a program that will ask for two float numbers and print its sum, difference, product, quotient and its remainder.


(iv) Write a function, computePrice that receives two parameters: the first one is a character variable indicating the size of the pizza (S, M or L) and the second an integer variable indicating the number of toppings on the pizza. It then computes the cost of the pizza and returns the cost as a floating point number according to the rules:

Small pizza = R50 + R5.50 per topping

Medium pizza = R70 + R6.50 per topping

Large pizza = R90 + R7.50 per topping


The post office needs a program that reads in postal address data and then displays the data in a neat format. • Declare four string variables name, addr1, addr2 and postalCode. • First, the main function of the program must input the data by means of a function called inputData. • Second, the main function calls the function displayData to display the name and address as follows: Mr R.S. Bopape P.O. Box 50741 Sandton 2146


(iii) Write a function void rectangle(int w, int h) to print an open rectangle of asterisks (*). The parameters w and h are the width and the height of the rectangle, expressed in number of asterisks


(ii) Write a void function that receives four int parameters: the first two by value and the last two by reference. Name the formal parameters n1, n2, sum and diff. The function should calculate the sum of the two parameters passed by value and then store the result in the first variable passed by reference. It should calculate the difference between the two parameters passed by value and then store the result in the second parameter passed by reference. When calculating the difference, subtract the larger value from the smaller value. Name the function calcSumAndDiff.


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS