C/C++ Learners Hub
C++ programs using selection control, and repetitions for this problem, ABC Chat Time is a booth to order different kinds of beverages. To buy a beverage, the customer must first specify the quantity of beverages that he wants. Then, the customer can choose a beverage from the following 3 flavours. flavours are 1. Expresso with RM -2.10, 2. Cappucino with RM -2.20 and 3. Latte with RM -2.30. After that, the customer will have a choice to add extra milk with an additional price of 50 cents. Once the order has been made, the seller will show the total amount that the customer needs to pay. Please note that if the quantity is more than one, then the customer needs to specify the kind of beverage that he wants for every quantity. He needs to also specify whether to add extra milk for every beverage. Kindly assist me to write this program and just a beginner.
Finding prime numbers from array
I was reading this post:
and wondered if there is a way to store a list of prime numbers as data (or open a text file containing a list of primes) and read the data so that an odd number of prime numbers concatenated together produce a prime number;
for example 11 + 13 + 17 = 41
A grocery shop wants create a system so that they can track the day to day records
of their inventory. The shop can shop can only store maximum 50 different
categories items at a time. Each categories of item have three variables, they are
itemID, itemPrice and itemQuantity. Write a C++ program using appropriate data
structure and which has following functions
insertItem() – it will ask user to enter new item and user have to enter the values of
itemID, itemPrice and itemQuantity.
DisplayAllItem() - it will display all items information.
DisplayOneItem()- it will ask user to enter specific itemID and it will only display
that item information.
Kindly do me favour with this: the criteria to qualify to get a loan form Zed bank is described as follows. First the applicant must have an account with the bank. If the applicant does not have an account with the bank, they are given the message, "please open an account before applying". If the applicant has an account, the period of time the applicant has been with the bank is checked. If the period is less than 2 years , the applicant is given the message, "you have not banked with us for more than two years". If the period is 2 or more years, the credit record is then Checked. If the credit is "bad", the applicant is given a message, "your credit history is bad". If the credit is "good", the applicant is asked for the amount they would like to borrow. If amount entered is above $250,000, the applicant is given a message. "The maximum credit allowed is $250,000". If the amount is between $500 to $250,000, the applicant is given the message, "congratulations you qualify to get a loan". if the amount is below $500, the applicant is given the message, "the amount i below the minimum limit". Write a program that uses nested if statement to determine whether a person qualifies for a loan or not.
Help me also with this question: a farmer wishes to know the cost and the amount of fertilizer required for his rectangular field of crops. The amount of fertilizer is determined by first calculating the area of a field and multiplying that by the rate of fertilizer application per square metre. Given that the rate of application is 0.05kg per square meter and the cost per kg of fertilizer is $10.50 per kg. Write a program that accept the length and width of a given field from the farmer. The program then calculates and prints the area of the field , the amount of fertilizer required and the total cost of fertilizer in dollars
kindly help me with this. domestic post paid electricity tariffs are calculated as follows: 0-200 kWh energy charge $0.15, above 200 kWh is $0.77, fixed charge is $18.23, 3% exercise duty, 16% of vat. write a program that requests for the units consumed in kWh. the program should then calculate and display the cost of the units, fixed charge, exercise duty, VAT and the total bill