i need an additional code. pls. help

1. Write a program that uses a function which computes for the Prelim Grade.

With the following details:
a. Quizzes ( Average of 3)
b. Exercises ( Average of 3 )
c. Class Participation
d. Class Standing
a. Class Standing (CS)= 50%( Average Quiz) + 30% (Class Participation) + 20%(Average Assignment)
e. Prelim Exam
f. Prelim Grade
a.

Requirements:
1. Create one main program (.cpp)
2. 3 functions are needed for the exercise. (.h)
a. Average function for Quizzes and Exercise (we have completed this in our previous exercise)
b. Function on Class Standing ( see formula above)
c. Function on the Prelim Grade ( see formula above)



 Make sure to turn in 4 files - main program (.cpp) and Function (.h)


Please take note the output that - Quiz 1 , Quiz 2 , Quiz 3 , Exercise 1, Exercise 2, Exercise 3 , Class Participation , and Prelim Exam are user input.

this is the only code i have: i've done a and b

#include <iostream>
#include "quiz.h"
#include "exercise.h"
int main ()
{
int a, b, c;
std::cout << ("Quizes(q) or Exercises(e)?: ");
char input;
std::cin >> input;
if(input == 'q')
{
std::cout << "Input Quizzes\n";
std::cout << ("Quiz 1:\t");
std::cin >> c ;
std::cout << ("Quiz 2:\t");
std::cin >> b ;
std::cout << ("Quiz 3:\t");
std::cin >> a;
std::cout << ("Average Quizzes:") << (average_quiz(a, b, c)) << ("\n\n");
}
if(input == 'e')
{
std::cout << ("Input Exercises\n");
std::cout << ("Exercise 1:\t") ;
std::cin >> c ;
std::cout << ("Exercise 2:\t") ;
std::cin >> b ;
std::cout << ("Exercise 3:\t");
std::cin >> a;
std::cout << ("Average Exercises:") << (average_exercise(a, b, c)) << ("\n\n");
}
else
{
std::cout << ("Invalid option: ") << (input) << std::endl;
return(-1);
}
std::cin.get();
return 0;
}
Last edited on
closed account (EwCjE3v7)
Hummer1 you cannot make multiple posts about the same thing.
Oh my gosh... I could not do this... I would just write the functions, and literally they would do nothing but call functions I wrote.

Sounds like they are teaching yall to be robotic drones these days...

My approach would be to make a class with a data structure, because all you're doing is modifying a set of data using functions, and then referencing it.
Last edited on
Topic archived. No new replies allowed.