Declare the variables mark and grade to be of type int and c

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

If(condition a)

Then

Statement b

Else 

Statement c

To illustrate this, I will use the grading system for a school to determine which grade the student is worth receiving depending on their mark score.

#include <stdio.h>

int main()

{

// declare the variables mark and grade to be of type int and char respectively

int mark;

char grade;

// Request the user to enter the students score 

printf("Enter Students scoren");

scanf("%d", &mark);

// Using selection, place a respective grade for the students score

if(mark >= 80 ) Then

Grade ='A';

Else if(mark >= 70) Then

Grade ='B';

Else if(mark >= 60) Then

Grade ='C';

Else if(mark >= 50) Then

Grade ='D';

Else

Grade ='F';

// Print the students mark and their grade

printf("The students grade is %d for a mark of %d n", sum, mark);
return 0;
}
What are other operators that could be used to sum or average a grade in your program? 

Reference no: EM13734522

Questions Cloud

Held constant when one moves along a supply curve : Suppose that the supply curve in question 1 above product is given by P=12+(2/3)Q where P is in thousands of dollars per auto and quantity is in millions of cars per year. What other things are held constant when one moves along a supply curve?
Compute price elasticity of demand and supply : Suppose the demand and supply curves for basketballs are given by: Qd = 200 – 5P. Using the demand and supply functions above, the equilibrium price of a basketball is ____, and the equilibrium quantity is ____. On the same graph above, show the effe..
What is the equilibrium price and quantity for sodas : The market for soda has supply and demand curves given by, What is the equilibrium price and quantity for sodas? Returning to question 1, suppose the government put a tax on soda of $0.50 per can to be paid by consumers. Graph the before and after ta..
Assume that a pfizer has a linear demand curve for lipitor : Assume that a Pfizer has a linear demand curve for Lipitor, a constant marginal cost curve (i.e. the marginal cost is a constant), and is a monopolist in this market.
Declare the variables mark and grade to be of type int and c : Use the grading system for a school to determine which grade the student is worth receiving depending on their mark score.
Create a risk assessment matrix for the purchase : Create a risk assessment matrix for the purchase and integration of six new web servers for a start-up Internet firm.
Explain the effect on equilibrium price and quantity : Using a supply-­ and-­ demand graph and assuming competitive markets, show and explain the effect on equilibrium price and quantity of the following:
Write a paper on history of black male explorers program : THE PAPER SHOULD INCLUDE: THE HISTORY OF THE BLACK MALE EXPLORERS PROGRAM, WHERE THE PROGRAM GETS ITS FUNDINF FROM and THE PURPOSE OF THE PROGRAM.
Illustrates an economy with an inefficient healthcare system : Draw a production possibilities curve between healthcare and all other goods. Insert a point in the drawing that illustrates an economy with an inefficient healthcare system. Insert two additional points that illustrate two efficient economies but tw..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Implement a second-order low-pass filter

Implement a second-order low-pass filter using the finite difference method. The finite difference method is a useful mathematical method that is used to numerically solve differential equations.

  Find answers of c programming questions

1. int main(void){ int height 3. 5; int width = 25: if(height == 5 && width == 25){printf("the height and width are correct: "); }return 0; }Assuming all libraries are included, what is the result of the code above when run?

  Print out each test score and the total

Write a program that will read in 2 test score. The instructor has decided to give each student 10 bonus point on each test.

  Undirected graph has scanning tree

undirected graph has scanning trees. The minimal scanning tree is the scanning tree with the minimal sum of weights on edges. The minimal scanning tree can be found by using Prim's algorithm

  Your main function will still prompt the user

Your main function will still prompt the user for the account number and service code. Based on the service code, main will ask for the correct number of minutes, then call your functions above as needed to finish the job. In addition you must.

  Write a program that calculates net pay

Write a program that calculates Net Pay. It should do this by calling a function called CalNetPay that calculates and returns Net Pay when given the hours worked and the hourly pay rate. The main function should pass the hours worked and pay rate ..

  Write a c++ program that prompts the user for a double

Write a C++ program that prompts the user for a double that is either positive or negative.

  Create a bar chart showing the average monthly mean temperat

Write a ++ program to create a bar chart showing the average monthly mean temperature for College Station from 2004 to 2013. The point of the exercise is to compute the sie and location of the rectangles rather than explicitely hardcode that informat..

  Prepare a table showing loan amount

Write a C++ program that prints a table showing loan amount, interest rate, length of loan, monthly payments, and total cost of a mortgage.

  C++ pointer function synopsis

C++ pointer Function Synopsis: char *amonthLess(char *dateString) Description: Variable dataString is a valid date in a form of mm/dd/yyyy Given the above information, write a main() program that asks a user to enter a date in a form of mm/dd/yyyy..

  Compares the number of possible sequences

A c++ program that compares the number of possible sequences of the length L that can be generated uinder the following assumptions. Given an alphabet of size N=9. The program must output a formatted list comparing the number of possible sequences..

  Build a randomly generated simple substitution cipher

Design, implement and test classes in C++ Apply and implement ? overloaded? operators and functions Design and implement classes using inheritance

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