Generation

generate functionMon, 09 Jan 2023

ask the user to input the Student Number, Student Name, Course, Prelim Grade, Midterm Grade and Finals Grade, and compute the Final Grade. Display Student Number, Student Name, Course, Prelim Grade, Midterm Grade and Finals Grade and Final Grade.

#include <iostream> using namespace std; int main() { long int Student_Number; string Student_Name; string Course; float Prelim_Grade; float Midterm_Grade; float Finals_Grade; float Final_Grade; cout << "Enter Student Number: "; cin >> Student_Number; cout << "Enter Student Name: "; cin >> Student_Name; cout << "Enter Course: "; cin >> Course; cout << "Enter Prelim Grade: "; cin >> Prelim_Grade; cout << "Enter Midterm Grade: "; cin >> Midterm_Grade; cout << "Enter Finals Grade: "; cin >> Finals_Grade; Final_Grade = (Prelim_Grade + Midterm_Grade + Finals_Grade) / 3; cout << "Student Number: " << Student_Number << endl; cout << "Student Name: " << Student_Name << endl

Questions about programming?Chat with your personal AI assistant