2 programs I cant do, c++

My program is not running for either, please help

[code]
Put the code you need help with here.
[/code
Assignment:

The kinetic energy of a moving object is given by the formula KE = (1/2)mv2. Given the mass (m) and speed (v) of an object, write a C++ program to calculate the kinetic energy of the object.
Read the mass and speed of an object from the user.
Calculate the kinetic energy of the object using the given formula. Use the math library function pow( ) in your formula.
Display the object’s attributes and calculated kinetic energy to a hundredth of a decimal point.
Sample Input/Output:

INPUT:
Please enter mass of the object: 6.3
Please enter speed of the object: 10.5

OUTPUT:
The attributes of the object are:
Mass: 6.3 kg
Velocity: 10.5 meters per second
The kinetic energy of the object is 347.29 joules.

Run your program and fix any errors.


(Save this file as B3-2.cpp.) Box Office program: A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie distributor. Write a program that calculates a theater’s gross and net box office profit for a night. The program should ask for the name of the movie, and how many adult and child tickets were sold. The price of an adult ticket is $6.00 and a child’s ticket is $3.00. The theater keeps 20% of the gross box office profit. The program should display a report similar to the sample output displayed. Use Name (symbolic) constants for the Adult Ticket Cost, Child Ticket Cost, and the percentage of gross box office profit.
Prompt and get the Movie name, adult tickets, and child tickets sold from the user.
Calculate the Gross Box Office profit.
Calculate the Net Box Office profit.
Calculate the Amount Paid to the Distributors.
Sample Input/Output (Format monetary values with 2 decimals.)

INPUT:
Enter the name of the movie: Gone with the Wind
Enter the number of Adult Tickets Sold: 382
Enter the number of Child Tickets Sold: 127

OUTPUT:
Movie Name……………………….….……Gone with the Wind
Adult Tickets Sold…………………………382
Child Tickets Sold………………………….127
Gross Box Office Profit………………….....$ 2673.00
Net Box Office Profit……………………….$ 534.60
Amount Paid to Distributors………….…..$ 2138.40


Run your program and fix any errors.
You will not get help this way.

Post your code. Ask Questions.

No one is going to do your homework.
Last edited on
My program is not running

That does not tell much.

If a code fails to compile, then the compiler tells error. Even when a code does compile, there can be compiler warnings that one should pay attention to. A successfully compiled program can crash or produce unexpected results. Exact error messages are valuable.

I'm not sure which type of "not running" you have.
Topic archived. No new replies allowed.