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

  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