Write a C++ program to implement this task.
Students are registered in 3 courses in a semester. To pass each course, students have to make a grade greater than or equal to 40. You have to write a program to determine if the student will pass or fail the semester, based on the following criteria:
A student passes if all three courses are passed. Additionally, a student may pass if only one subject is failed, and the overall average grade for the 3 courses is greater than or equal to 50.
Your program should prompt the user to enter grades for the three courses. Make use of a named constant for defining the pass mark of 40.
SAMPLE RUN 1
Enter the 3 grades, separated by a space:
75 85 90
You entered: Grade_1 = 75 Grade_2 = 85 Grade_3 = 90
Average Grade: 83.3333 You Passed :-)
#include <iostream>
using namespace std;
#define FAIL_SCORE 40
#define AVG_FAIL_SCORE 50
int main() {
double n1, n2, n3;
cout << "Enter the 3 grades, separated by a space:" << endl;
cin >> n1 >> n2 >> n3;
cout << "You entered:" << endl;
cout << "Grade_1 = " << n1 << endl;
cout << "Grade_2 = " << n2 << endl;
cout << "Grade_3 = " << n3 << endl;
double avg = (n1+n2+n3) / 3;
cout << "Average Grade: " << avg;
int fail_count = 0;
if (n1 < FAIL_SCORE) ++fail_count;
if (n2 < FAIL_SCORE) ++fail_count;
if (n3 < FAIL_SCORE) ++fail_count;
if (fail_count > 1 || (fail_count == 1 && avg < FAIL_SCORE)) {
cout << " You Failed :-(" << endl;
} else {
cout << " You Passed :-)" << endl;
}
return 0;
}
Write a C++ program to implement this task. Students are registered in 3 courses in a...
Write python code on computer, No handwritten
code
You will implement a program which asks the user to enter scores of different courses in different semesters. The program should read the input and output some simple statistics 1. An example input string by the user is given below. Fal12016-coursel:82, course2:80,course3:85;Spring2018- course4:82;Fall2018-course5:85, course6:50, course7:78 Info from different semesters are separated by a ";", courses in each semester are separated by a,and score and corresponding course is separated by a, information of...
Implement a C program to calculate the Average Score Point(ASP) of a student taking N courses in a semester. Ask the user for the number of courses(N) the student is taking in the semester, and check if the number of courses is greater than 1 (>1). If the number of courses is less than or equal to 1(<=1), display an error and ask the user to try again until the right input is entered. Next, ask the user for the...
2. Write a program that enters the scores of an exam for 10 students. Then the program finds the minimum grade, the maximum grade, and the average of the exam. See below run of the program. Enter the grades for the 10 exams: 10 95 85 65 88 79 85 90 99 Support © 91 The minimum grade is: 10 The maximum grade is: 99 The average grade is 78.8 Press any key to continue ...
Write a program that asks the user for a student name and asks for grades until the user enters a non-number input, it should then ask if the user wants to enter another student, and keep doing the process until the user stops adding students. The student’s must be stored in a dictionary with their names as the keys and grades in a list. The program should then iterate over the dictionary elements producing the min, max, and mean of...
In this homework, you will design a program to perform the following task: Write a program that would allow a user to enter student names and Final grades (e.g. A,B,C,D,F) from their courses. You do not know how many students need to be entered. You also do not know how many courses each of the students completed. Design your program to calculate the Grade Point Average (GPA) for each student based on each of their final grades. The program should...
The Maybe High School offers a course that prepares students for tertiary-level education. Last year, several students who completed the course matriculated to a tertiary level institution of their choice. Naturally, the college wants to know how well its students did on the exam. You have been asked to write a program to summarize the results. Your program should: Prompt the user to enter the final grades of an indefinite number of students. Note: A final grade greater than or equal to 75 is considered a...
Write a C++ program. Using the while loop or the do – while loop write a program that does the following: Calculate the average of a series of homework grades (0 - 100) entered one at a time. In this case the lowest score will be dropped and the average computed with the remaining grades. For example suppose you enter the following grades: 78, 85, 81, 90, 88, 93 and 97.The average will be computed from the 6 grades 85,...
Write a program to calculate students’ average test scores and their grades. You may assume the following data: Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 30 69 87 Blair 23 45 96 38 59 Clark 60 85 45 39 67 Kennedy 77 31 52 74 83 Bronson 93 94 89 77 97 Sunny 79 85 28 93 82 Smith 85 72 49 75 63 Use three...
Write a program to calculate students’ average test scores and their grades. You may assume the following data: Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 30 69 87 Blair 23 45 96 38 59 Clark 60 85 45 39 67 Kennedy 77 31 52 74 83 Bronson 93 94 89 77 97 Sunny 79 85 28 93 82 Smith 85 72 49 75 63 Use three...
In JAVA please! Write program for exercises You will write a Graphical User Interface(GUI) application to manage student information system. The application should allow: 1. Collect student information and store it in a binary data file. Each student is identified by an unique ID. The user should be able to view/edit an existing student. Do not allow student to edit ID. 2. Collect Course information and store it in a separate data file. Each course is identified by an unique...