Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help!! Here is what i have entered but its wrong and I can't figure out what is wrong with the progam Output: 2.06) Write a

Help!!

Here is what i have entered but its wrong and I can't figure out what is wrong with the progam

image text in transcribed

Output:

image text in transcribed

2.06) Write a program that predicts the score needed on a final exam to achieve a desired grade in a course. Formula to calculate the Final Grade is following: Grade on Final = (100% * Grade Average Desired - (100% - Final Exam Worth) * Current Grade)/Final Exam Worth SAMPLE RUN #4: . / Grade Predict Standard Input Hide Invisibles Ae 932 91.54 40- SUBMIT #include 2 // main function 3 int main() 4 { 5 // for storing values 6 float final,minavg, curravg, count; 7 char grade; 8 // taking input grade printf("Enter desired grade: "); 11 scanf("%c",&grade); 12 13 // taking min avg 14 printf("Enter minimum average required for grade %c:",grade); 15 scanf("%f",&minavg); 16 // taking current average 18 printf("Enter current average in course:"); 19 scanf("%f",&curravg); 20 21 printf("Enter how much the final counts as a percentage of the course grade: "); 22 scanf("%f",&count); 23 24 // calculating final by using formula final = (100 * minavg - (100 - count) * curravg)/count; 26 // output 28 printf("You need a score of %.2f on the final to get a %. ", final, grade); 29 30 } 17 9g89% Failed 4 out of 4 test runs. ODD Failed Test Run #1 The contents of your standard output is incorrect. There is an error in your prompts. Interactive Session - W Hide Invisibles Highlight: None Show Highlighted Only O Expected Result: Enter.desired.grade:C+d Enter.minimum-average.required for grade. C+:78- Enter current average-in-course: 852 Enter how much the final.counts as a percentage of the course.grade: 20- You need a score of 50.00-on-the-final-to-get.a.C+. Your Code's Actual Result: Enter.desired.grade: C++ Enter.minimum average required for grade.C:78- Enter current average. in course:85- Enter how much the final.counts.as.a.percentage of the course.grade: 20- You need a score of.-2994522485669606328248885936390144.00-on-the-final.to:get.a.C

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions