+1-415-315-9853

info@mywordsolution.com

## Engineering

 Civil Engineering Chemical Engineering Electrical & Electronics Mechanical Engineering Computer Engineering Engineering Mathematics MATLAB Other Engineering Digital Electronics Biochemical & Biotechnology

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

• 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.

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

Computer Engineering, Engineering

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

Have any Question?

## Related Questions in Computer Engineering

### Design and implement an algorithm that will efficiently

Design and implement an algorithm that will efficiently search a given text for a particular keyword or pattern and record the number of times the keyword or pattern is found. Design a main program that calls the procedu ...

### Components of a telecommunication system and basic computer

Components of a Telecommunication System and Basic Computer Network Components are major components of a business : What are the main differences of these two systems? Do you need to have both of them to support your com ...

### The little languages presented in section 29323 have

The little languages presented in Section 29.3.2.3 have ambiguous semantics. For example, in the location language, does "not host1 or host2" mean "not at host1 and not at host2" or "not at host1, or at host2"? a. Rewrit ...

### 1 in the game of life can you construct a glider gun of

1. In the Game of Life, can you construct a glider gun of glider emission period 15? Period 20? Save your configurations as buttons in the Life model in the NetLogo models library. 2. A methuselah is a small pattern that ...

### 1 describe a physical firewall that is used in buildings

1. Describe a physical firewall that is used in buildings. List the reasons why an organization might need firewalls for physical security controls. 2. What is considered the most serious threat within the realm of physi ...

### Internethas the internet contributed to plagiarism has it

Internet Has the Internet contributed to plagiarism? Has it made it easier to plagiarize? Do individuals that place original content have right to be acknowledged or is it too much of a hindrance? Write 3-4 pages A. Rese ...

### Assume a tcp server is expecting to receive byte 2401 it

Assume a TCP server is expecting to receive byte 2401. It receives asegment with the sequence number 2401 that carries 500 bytes. If the server has no data to send at this moment and has not acknowledged the previous seg ...

### 1 what are the types of password attacks what can a systems

1. What are the types of password attacks? What can a systems administrator do to protect against them? 2. What is the difference between a denial-of-service attack and a distributed denial-of-service attack? Which is mo ...

### 1 show that the approximate diffusion equations derived for

1. Show that the approximate diffusion equations derived for a constant electric field, (750.3A) and (750.4A), are also valid if E is not spatially constant but the region is quasi-neutral. This enables a derivation of a ...

### Describe how exactly you would perform a collision search

Describe how exactly you would perform a collision search to find a pair x1, x2, such that h(x1) = h(x2) for a given hash function h. What are the memory requirements for this type of search if the hash function has an o ...

• 13,132 Experts

## 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.

### WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

### Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

### Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

### Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

### Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro