I have to create a class average grade calculator for my C++ and having some major trouble. I am very new to programming and have been having trouble catching up. I had to modify this code to work with my program requirements but can't get it to work.
Please help! I am totally lost
#include<stdio.h>
int Test;
int Quiz;
int Program;
float TestAve;
float QuizAve;
float ProgramAve;
void StudAverage()
{
int sum=0;
float StudAvg=0;
int n;
printf("\nEnter number of Program grades : ");
scanf("%d",&Program);
printf("\nEnter number of Quiz grades : ");
scanf("%d",&Quiz);
printf("\nEnter number of Test grades : ");
scanf("%d",&Test);
for(n=1;n<=Student;n++)
{
printf("\nStudent %d\n",n);
sum=0;
float t;
for(int i=0;i<Program;i++)
{
do
{
printf("Enter Program Grade %d :",i+1 );
scanf("%f",&t);
/*test if user is entering a valid number*/
}
TestAve=sum/Test;
sum=0;
for(int i=0;i<Quiz;i++)
{
do
{
printf("Enter Quiz Grade %d :",i+1 );
scanf("%f",&t);
/*test if user is entering a valid number*/
}