Design a class Market to calculate the total expenses. Use appropriate member functions
i) The quantity and price per item are the data member of the class which is input by the user
2) discount of 10% is offered if the expense is more than 5000.
3) Calculate the total expenses
4) Display total amount, discount and Amount to pay.
Write a C++ code to overload the function sqr() . In the first call of the function sqr(), an integer 15 is passed. The compiler executes the integer version of the function and returns result 225. In the second call a float value 2.5 is passed to function sqr(). The compiler executes the float value of the function and returns the result 6.25. The selection of which function to execute is decided at the run time by the compiler according to the datatype of variable passed.
One box have some apples and another box have some oranges, develop a C++ program to find the sum of fruits and double the sum of fruits in the box using call by reference concept.
Write a program which prompts the user for a Celsius temperature, convert the temperature to Fahrenheit, and print out the converted temperature.
Assume that we execute the following assignment statements:
width = 17
height = 12.0
For each of the following expressions, write the value of the expression and the type ( of the value of the expression )
1. width/ /2
2. width/2.0
3. height/3
4. 1 + 2 * 5
Use the Python interpreter to check your answers
Write a program to prompt the user for hours and rate per hour to compute gross pay.
Enter Hours: 47
Enter Rate: 3.25
Pay: 152.75
Plz what is the code gravitational force easy code in dev c++
The Admission to a professional course is done using the following conditions.
a) Marks in Maths> =60
b) Marks in Physics >=50
c) Marks in chemistry >=40
d) Total in all the three subjects >=200 (or) Total in Maths and Physics >=150
Given the marks of three subjects, write a C++ program to process the applications to list the eligible candidates.
Write a C++ code for the following pattern display using ios classes. The precision is set according to the value of variable x. (use setprecision(), setwidth(), setfill() ios flags and functions).
Develop a C++ program for the person who wrongly filled the online application and help him to convert the input string to lowercase and uppercase.