Write a program calculates the average of the four grades

Assignment Help C/C++ Programming
Reference no: EM13969433

Part A

Explain the difference between:

s = 0;
If (x > 0) s++;
If (y > 0) s++;

and

s = 0;
if (x > 0) s++;
else if (y > 0) s++;

Part B

What are the values of s and n after the following loops?:

a. int s = 1;
int n = 1;
while (x < 10)
s = s + n;
n++;

b. int s = 1;
int n;
for (n = 1; n < 5; n++)
s = s + n;

c. int s = 1;
int n = 1;
do
{
s = s + n;
n++;
}
while (s < 10 * n);

Part C

Write a program that accepts four grades, calculates the average of the four grades, and then converts the average from a number grade into a letter grading using the following grading scale:

A 100 - 90
B 89 - 80
C 79 - 70
D 69 - 60
F 59 - 0

Output the final grade average along with the letter grade.

Reference no: EM13969433

Questions Cloud

Different types of legal proceedings : Identify the different types of legal proceedings which might arise from these facts. For each type of legal action you have identified in (a), discuss the nature of the legal liability and the purpose or objective of taking legal action.
What leadership qualities did the coaches demonstrate : What leadership qualities did the Coaches demonstrate to be able to bring the team together to win the championship?
Civil or criminal proceedings : Consider the following legal actions and indicate whether civil or criminal proceedings would result: (a) Ann decides to divorce her husband, Barry, after 10 years of marriage;
Indicate the type of sales promotion : Indicate the type of sales promotion that a producer might use in each of the following situations and briefly explain your reasons: (1) A firm has developed an improved razor blade, but customers are not motivated to buy it.
Write a program calculates the average of the four grades : Write a program that accepts four grades, calculates the average of the four grades, and then converts the average from a number grade into a letter grading using the following grading scale: Output the final grade average along with the letter gra..
How various elements of system support innovation at three-m : How has 3M built structural and contextual ambidexterity into the organization? How do the various elements of the system support innovation at 3M?
Identify the risks associated with the supplier expansion : Write a 1,050- to 1,400-word paper in which you do the following: Identify the risks associated with the supplier expansion. Document those risks in the Risk Project Log template. Perform a qualitative risk analysis using risk probability and impact ..
Aspects of the effectiveness of humor : Your paper should delineate three or more aspects of the effectiveness of humor and indicate at least three risks of attempting to use humor in persuasion. Your paper should include previous theories of persuasion and discuss how the technique of ..
Brief description of the malware and it capabilities : Visit the Museum, choose a malware from the collection and study it. Post a brief description of the Malware and it capabilities. Your post should be in your own words based on your understanding of the malware that you examined. Text-book style ..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd