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

  File containing a series of integers is named

Assume that a file containing a series of integers is named numbers.dat and exists on the computer's disk. Design a java program that reads all the numbers stored in the file and calculates and displays on the console

  Design and implement a class called bus

Define the Bus constructor to accept and initialize all instance data. Include getter and setter methods for all instance data.

  Write a pseudocode function in terms of adt appointment

Write speci?cations for a method within Date that advances any given date by one day. Include a statement of purpose, the preconditions and postconditions, a description of the arguments, and a description of any return value.

  Waiting time is the diff b/w the arrival time and simulation

The Server removes a customer from the queue then generates a random number between 1 and 5 to simulate a transaction type i.e. Open a checking account etc.

  Program to enter number of values to be processed

Write c++ statements to permit the user to enter n, the number of values to be processed; then assign the anonymous array of n double values, storing its address in doublPtr.

  Draw a two-dimensional house seen from the front

Draw a two-dimensional house seen from the front, the way a child would: with a door, two windows, and a roof with a chimney. Feel free to add details; mabe have "smoke" come out of the chimney.

  What will be the value of xafter executing the above switch

If x = 3, then what will be the value of xafter executing the above switch statement?

  Show the items by zone or location within the store

There is other information. Some people shop on a budget so they need the price and the sale price. Use an array or vector to hold the list of items. The display should show the items by zone or location within the store. (Display the output by loc..

  Prompt the user to enter the total capacity of the cage.

Determine when the farmer will have to separate the bunnies in order to prevent the birth of any more.

  Label object displaying the saying

Under the Format selection, include options of Font and Color. Wire the Font and Color options to the Windows predefined Font and Color dialog boxes so that when their values are changed, the text in the Label object displaying the saying is chang..

  Write a recursive function

Write a recursive function, vowels, that returns the number of vowels in a string and write the definitions of the functions to overload the operators defined in parts a to c.

  Write a c program to print permutation

Given integer n and permutation of numbers 1,2,..n-1, c program to print permutation that lexicograghically precedes given input permutation if permutation is least print input permutation itself

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