Write a C++ program in which, read a c-string sentence as input from File. Now your task is to reverse each word of sentence
Define a class Book with the following specifications:
Private members of the class BOOK are
BOOK NO integer type BOOKTITLE 20 characters PRICE float (price per copy) TOTAL_COST() A function to calculate the total cost for N number of copies where N is passed to the function as argument.
Public members of the class BOOK are
INPUT() function to read BOOK_NO, BOOKTITLE and PRICE. PURCHASE() function to ask the user to input the number of copies to be purchased. It invokes TOTAL_COST() and prints the total cost to be paid by the user.
Three private variables: int cid,char cname[15] & float balance
Three public member functions:
void read() - This function should read the value of cid, cname & balance from user.
void print() - This method should display the value of cid, cname & balance.
void balanceTransfer(Bank &a1,Bank &a2) - This function receive two Bank objects as arguments and perform 1000 balance transfer from object a1 balance to object a2 balance.
Three private variables: int cid,char cname[15] & float balance
Three public member functions:
void read() - This function should read the value of cid, cname & balance from user.
void print() - This method should display the value of cid, cname & balance.
void balanceTransfer(Bank &a1,Bank &a2) - This function receive two Bank objects as arguments and perform 1000 balance transfer from object a1 balance to object a2 balance.
You are going to create a quiz in python. Your program should allow the player to choose the subject they want to attend the quiz. For each subject, you are required to display at least 3 questions for them to answer. After each question, they answered you need to display the result whether the answer they chose is correct or wrong. After they finished answering all the questions, your program should display the score they have earned in that subject quiz. Note: You are required to implement the concepts (decision structure, repetitive structure, function) that we have studied in programming concept class. Take note that you have to give at least 3 subjects as options and provide at least 3 questions for each subject.
Write a function that finds the factorial of a number. The function should get a number from the user as an argument and should print the factorial of the number as the user requested.Β
Write a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. For example, if 7 and 12 are passed as arguments to the function, the function should return 12. Use the function in a program that prompts the user to enter two integer values. The program should display the value that is the greater of the two.
Write a function that calculates a taxi fare for the travelers. Your program should get the information of the distance traveled by the customer and calculate the taxi fare and should display it to the passenger for the payment to be received. The taxi fare consists of a base fare of RM 4.00 plus charges of RM 0.25 for every 140 meters traveled. Define and call the function accordingly.
Write simple mathematics (combination of addition, subtraction, multiplication) game program for kids which gives ten randomly generated questions. Your program should keep track of the scores for the right answers and should display them to the students after they finished answering all questions. If the answer is right, print Right!. If the answer is wrong print Wrong! and display the right answer. You should write the program code using the loop concept. Also, print the question numbers, when printing the question
Assume, it is the end of the semester and the students would like to know the GPA they achieved for the subjects they registered and sit for the final exam. You are going to develop a program that can calculate GPA for the students according to the grade they get and the subject credit hours. The point scale for the grade is shown below. Grade Point Scale A 4.0, A- 3.7 ,B+ 3.3, B 3.0, B- 2.7, C+ 2.3, C 2.0, C- 1.7, D+ 1.3, D 1.0, D- 0.7, F= 0 Note the formulae below to calculate the GPA. πΊππ΄ = πππ ππ (πππππππ ππππ ππ π₯ ππππ π πππππ) / πππππ ππππ ππ πππππππππ Please make sure to apply the loop concept.Β