+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

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

### Let m and c be random variables that take values from the

Let M and C be random variables that take values from the set of possible plaintexts and the set of possible ciphertexts for some cryptosystem. Prove that the cryptosystem provides perfect secrecy if and only if p(M | C) ...

### What factors should a firm consider when evaluating a move

What factors should a firm consider when evaluating a move from a client/server system to a cloud computing environment? Answer in about two paragraphs with reference. Must be 200-400 words and show an understanding and ...

### 1 why is pki so vital in modern communications2 discuss the

1. Why is PKI so vital in modern communications? 2. Discuss the role of digital signatures in modern communication. 3. Some say that with the development of systems such as IPSec, the role the CAs play in modern communic ...

### 1 the example describing skey stated that for md4 and md5

1. The example describing S/Key stated that "for MD4 and MD5, dictionary attacks are not a threat provided the seeds are chosen randomly." Why? How realistic is this assumption? 2. Why should a time-based authentication ...

### 1 investigate how netscape navigator and internet explorer

1. Investigate how Netscape Navigator and Internet Explorer implemented SSL technology. 2. Study both SSL and S-HTTP. Show that these two protocols have a lot in common. However, the two protocols have some differences. ...

### 1 what is intellectual property ip is it afforded the same

1. What is intellectual property (IP)? Is it afforded the same protection in every country of the world? What laws currently protect it in the United States and Europe? 2. How does the Sarbanes-Oxley Act of 2002 affect i ...

### In some applications particular information needs to be

In some applications, particular information needs to be retrieved from a list with a much higher frequency than other information. Under these conditions the best way to arrange the list is to put the most frequently re ...

### 1 what is the size of the key space if all 8 characters are

1. What is the size of the key space if all 8 characters are randomly chosen 8-bit ASCII characters? How long does an average key search take with a single PC? 2. How many key bits are used, if the 8 characters are rando ...

### 1 identify the five components of a data communications

1. Identify the five components of a data communications system. 2. What are the three criteria necessary for an effective and efficient network? 3. What are the advantages of a multipoint connection over a point-to-poin ...

### 1 a bss id bssid is a 48-bit address assigned to a bss in

1. A BSS ID (BSSID) is a 48-bit address assigned to a BSS in an 802.11 network. Do some research and find what the use of the BSSID is and how BSSIDs are assigned in ad hoc and infrastructure networks. 2. Do some researc ...

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

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

### Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen