im trying to practice on: Basic User Defined Functions/ Pass by Value Functions for class and im confused. this code has a problem with it, its not printing everyting i want it to say. can someone help me understand this and what i am doing what wrong and what i need to do ?
enter number of questions:
number of questions correct:
grade:
#include<iostream>
using namespace std;
double calculateGrade(double grade);
int enterTotalQuestions(int tot_quest);
int main()
{
int quest_corr;
cout << "how many questions are correct " ;
cin >> quest_corr;
int enterTotalQuestions(int tot_quest);
double calculateGrade(double grade);
return 0;
}
double calculateGrade(double grade)
{
int quest_corr, tot_quest;
grade = quest_corr/tot_quest;
cout << grade;
return grade;
}
int enterTotalQuestions(int tot_quest)
{
cout << "total number of questios: " ;
cin >> tot_quest;
return tot_quest;
}