Write a program to enter a score and a points possible for a test, computer the percent, display the percent to 1 decimal place and then display the letter grade (A – F) using a standard scale (90, 80, 70, 60) – use the if ... else if ... else if ...

Example
Enter points on test: 38
Enter points possible: 49
You got 77.6 percent
That is a C

I dont know how to start it out and i know a little about the if-else statements, in my class we are using netbeans and using java..

//This is java forum
// read two values (Obtained point and Maximum points)
double percentage = (Obtained Point/Maximum Point)*100 //-----------> This gives you % of
// the points.

printf("Percentage %0.0f",percentage);
if(percentage>=90)
printf("A GRADE");
else if(percentage>=80)
printf("B GRADE");
else if(percentage>=70)
printf("C GRADE");
else if(percentage>=60)
printf("D GRADE");
else if(percentage>=50)
printf("E GRADE");
else
printf("F GRADE");


Hope the code is helpful for you,

Blastoise,

Assuming you're in college (and courses started at the end of August, start of September), it would mean two months have passed in the semester. Are you telling me you don't have a clear understanding of how "if-else" statements work?

Anyways, here's an example of the type of program you're looking for. [SOURCE]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.