Please Give ATTENTION...

Anyone can help me solve me these programming projects?
I don't know how to do it.. Can someone give me a code?

I really appreciate if you will help me.. Thanks

PROGRAMMING PROJECTS:

1. A metric ton is 35,27.92 ounces. Write a program that will read the weight of a package breakfast cereal in ounces and output the weight in metric tons as well as the number of boxes needed to yield one metric ton of cereal.

2. A government researc lab has concluded that an artificial sweetener commonly used in diet soda will cause death in laboratory mice. A friend of yours is desperate to lose weight but cannot give up soda. Your friend wants to know how much diet soda it is possible to drink without dying as a result. Write a program to supply the answer. The input to the program is te amount of artificial sweetener needed to kill a mouse, the weight of the mouse, and the weight of the dieter. To ensure te safety of your friend, be sure the program requests the weight at which the dieter will stop dieting, rather than the dieter's current weight. Assume that diet soda contains one-tenth of 1% artificial sweetener. Use a variable declaration wit the modifier const to give a name to this fraction. You may want to express the percentage as the double vaue 0.001.

3.Workers at a particular company have won a 7.6% pay increase retroactive for six months. Write a program that takes an employee's previous annual salary as input and outputs the amount of retroactive pay due the employee, te annual salary, and the new monthly salary. Use a variable declaration wit te modifier const to express the pay increase.

4. Negotiating a consumer loan is not always straightforward. One form of loan is te discount installment loan, which works as follows. suppose a loan as a face value of $1000, the interest rate is 15%, and te duration is 18 monts. Te interest is computed by multiplying te face value of $1000 by 0.15, yielding $150. Tat figure is then multiplied by the loan period of 1.5 years to yield $225 as the total interest owed That amount is immediately deducted from te face value, leaving te consumer with only $775. Repayment is made in equal monthly installment based on te face value. So te monthly loan payment will be $1000 divided by 18, which $55.56. This metod of calculation is a bit more complicated if the consumer needs $1000. Write a program that will take tree inputs: the amount the consumer needs to receive, the interest rate, and the duration of the loan in months. The program shouls ten calculate te face value required in order for te onsumer to receive te amount neede. It sould also calculate te monthly payment.

5. Write a program that determines wheter a meeting room is in violation of te law regulations regarding te maximum room capacity. Te program will read in the maximum room capacity and te number of people to attend te meeting. If te number of people is less tan or equal to te maximum room capacity, te program announces that it is legal to hold the meeting and tells how many additional people may legally attend. If the number of people exceeds te maximum room capcity, te program announces that te meeting cannot be held as planned due to fire regulations and tells how many people must be excluded in order to meet te fire regulations.

6. An employee is paid at a rate of $16.78 per hour for regular hours worked in a week. Any hours over tat are paid at the overtime rate of one-half times cat. From te worker's gross pay, 6% is withheld for state income tax, and $10 per week is withheld for union dues. If te worker has three or more dependents, then an additional $35 is withheld to cover te extra cost of healt insurance beyond what te employee pays. Write a program tat will read in te number of hours worked in a week and te number of dependents as input and tat will then output te worker's gross pay, eacj withholding amount, and te net take-home pay for the week.

7. One way to measure te amount of energy that is expended during exercise is to use metabolic equivalents (MET). Here are some METS for various activities:

Running 6MPH: 10 METS
Basketball: 8 METS
SleppingL MET

the number of calories burned per minute may estimated using te formula
Calories/Minute=0.0175xMETxWeight(Kg)
Write a program that inputs a subjects' weight in pounds, the number of METS for an activity, and the number of minutes spent on that activity, and ten ouputs an estimate for the total number of calories burned. One kilogram is equal to 2.2 pounds.

8. Te babylonian algoritm to compute the square root of a number n is as follows:
a. Make a guess at te answer (you can pick n/2 as your initial guess).
b. Compute r=n/guess.
c. Stet guess=(guess +r)/2.
d. Go back to step 2 for as many iterations as necessary. Te more steps 2 and 3 are repeated, te closer guess wll become the surae root of n.

Write a program that inputs an integer for n, iterates through the Babylonian algorithm five times, and ouputs te answer as a double to two decimal places. Your answer will be most accurate for small values of n .

9. The video game machines at your local arcade outputs coupons depending on how well you play te game. You can redeem 10 coupons for a candy bar or 3 coupons for a gumball. You prefer candy bars to gumballs. Write a program that inputs te number of coupons you win and outputs how many candy bars and gumballs you can get if you spend all of your coupons on candy bars first and any reamianing coupons on gumballs.





Please answer any of the problem above.. You can answer it all if you want to..

God bless!


I already tried to do it but I cannot really answer it because I did not yet take the C++ subject.. Actually, it's not my assignment... I read a C++ book in our school library and I got the basic writing of C++ program.. But I can't solve the problems above.. I saw those problems on that book and I want to try if the code for it will work if I'll try to run the program.. The problem is that I can't able to solve the problem.. I just thought that maybe if I got the code, I can study it by myself..Actually, there are 30 questions that I saw there but I just posted 9...

The reason I joined this site is to be able to understand about C++..
I hope someone can help me because next semester, I want to be ready for my C++ subject... There are rumors that our instructors will test the students at the beginning of the next semester...
Last edited on
Do your own homework. People here don't mind helping if you get stuck on something, but we're not going to just do your assignment for you. Especially when you clearly haven't even tried doing it yourself.
Topic archived. No new replies allowed.