Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Computer Engineering Expert

Go to http://www.softintegration.com/ and download Ch 7.0.  You will need to click on “Ch Standard and Student editions free” then click the “Download Now!” button.  You will be asked to register with the site.  They will send you a confirmation email with a password (use your school email address), then you can log in to the site.  Follow the instructions from there.

 A) Command Mode

College life is tough.  Eating pizza for every meal is hitting you hard.  You are looking at working out to stay healthy.  You found a web site which tells you how many calories each exercise burns.  As a part of the planning, you require to find out how long it will take you to burn off your lunch.  A normal 14 inch pepperoni pizza has 2480 calories with 310 calories per slice.

For this part of the assignment, you would be using the Ch command-line interface.  Use the instructions given at the end of this portion of the assignment.

• Declare four floating point variable called Calories, Time, CPH and Slices. float Calories, Time, CPH, Slices;

• prepare the input statement for CPH and then (at the prompt) enter the value representing the average calories per hour the exercise burns.
cin >> CPH;

• prepare the input statement for Time and then (at the prompt) enter the value representing the total time you worked out.

• Determine the total amount of calories burned. Calories = Time * CPH;

• Determine the total number of pizza slices you can eat if you worked out for 2 hours. Slices = (CPH * 2)/310;

• Output the total calories burned and number of slices you could eat.
cout << “The total calories burned are ” << Calories << “ calories.” << endl;
cout << “The number of pizza slice you may eat are ” << Slices << endl;

B) Program Mode

• Open Notepad

• The first line should be the comment statement. Include your name in the comment.

• Save the file. Remember to save the work frequently.

• Type include statement that is required to facilitate input/output capabilities.

• The beginning of the code starts with the following statement: main ( ) {

• Enter your code after the opening curly bracket. Your code must contain the statements to do the following. Remember to close each line of code below with the semicolon.

a) Declare four floating point variable called CPH, Time, Calories, and Slices.

b) Output a brief phrase asking for the user’s calories per hour the exercise burns.

c) Input the calories per hour.

d) Output a short phrase asking for total timed the user worked out.

e) Input the time.

f) Determine the total calories burned at the time of the workout and the total pizzas you can eat.

g) Output the computed calories burned and number of pizzas you can eat.

• End your program code with the closing curly bracket.

• To run your program, type ./filename in the Ch command-line interface (dot forward-slash filename; the ch extension is not needed here)

• If you have error messages, note the cause of error indicated in each message and change your code to fix the problem(s).

• To make changes to your program, move back into Notepad, change the code, and save the file.

• To execute the program again, move back to the Ch window and use the up-arrow key to move the command ./filename to the current line.

• Don’t forget to save backup copies of all your work.

Academic Honesty

• The work you turn in is to be your work, not copied from someone else or from the web.

• Do not allow anyone access to your files

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9872

Have any Question? 


Related Questions in Computer Engineering

How is barlows declaration of independence similar and

How is Barlow's declaration of independence similar and different from theDeclaration of Independence (Links to an external site.)that Thomas Jefferson wrote in 1776 in terms of what each wanted to achieve for the "peopl ...

It is graded based on the development of critical thinking

It is graded based on the development of critical thinking, analysis, and support for points. You are to prepare a brief paper, but recommended length is about two - three single-spaced (four to six double-spaced) pages ...

Choose an image of a complex scene showing familiar objects

Choose an image of a complex scene showing familiar objects and/or people and sketch it without tracing. Now, sketch the same scene with the image upside down. Do not try to identify the objects in the photograph. Concen ...

Create a program using raptor that allows user enter

Create a program using Raptor that allows user enter current salary, annual raise rate, and years the user plan to work, and then calculate and display proposed salary for each year and total salary for those years. annu ...

A popular data warehouse implementation is to construct a

A popular data warehouse implementation is to construct a multidimensional database, known as a data cube. Unfortunately, this may often generate a huge, yet very sparse, multidimensional matrix. (a) Present an example i ...

A customer has requested help with troubleshooting various

A customer has requested help with troubleshooting various security problems. Since the computer is for home use, the customer wants to safeguard it so that his children do not access specific information. Recently, the ...

Find an articlenbsponlinenbspthat discusses faith

Find an article online that discusses faith, technology and the Third World. Do a search using the key words "faith", "technology", and "third world." Respond to the following questions using your article as a reference: ...

Write and test a method that copies all the entries from a

Write and test a method that copies all the entries from a LinkedList into a cell array. a. What kind of process is this? (Folding? Mapping?) b. Is this restricting the nature of the data in any way?

1 miles-per-gallon a cars miles-per-gallon mpg can be

1. Miles-per-Gallon A car's miles-per-gallon (MPG) can be calculated with the following formula: MPG = Miles driven / Gallons of gas used Design a program that asks the user for the number of miles driven and the gallons ...

A large number of fish are suddenly found floating dead on

A large number of fish are suddenly found floating dead on a lake. You are called in to investigate the problem. You find an abundance of phytoplankton and no evidence of toxic dumping. Suggest a reason for the fish kill ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate