C code christmas assignment we are supposed to create a


C code Christmas assignment. We are supposed to create a record generating programme that will accept user information and output student information (student grade, highest and lowest grade, pass or fail status). Must be done in modular form, have a struct and a file.

#include
#include
#include

//This programe calculates the grades for a student in ecah form and produces a report.
/*The programe also calculates the maxinimum and minimum grades scored by the student
in each individual subject. The rank of the student would also be calculated. */

struct grades
{

char fname[30],lname[30];
float course[1], subject[10],grade[10];
int age[1],gender[1];
};

int main ()
{
char tname [30];
int choice


printf("Welcome to the St.James Institute Report Systemn");
printf("Enter teacher's name: n");
scanf("%c", tname []);
system ("CLS");

printf("Which report do you want to view?n");
printf("1: General Reportn");
printf("2: Individual Reportn");

switch (choice)
{
case 1:
printf("General Reportn");
case 2:
printf("Individual Reportn");
default:
printf("ERROR");

}

getch();

return 0;

}
void class_info ()
{
int year, semester, class, amt_students;

printf ("Enter the current yearn");
scanf("%d", & year);
printf("Enter Semester (1, 2 or 3)n");
scanf("%d", & semester);
printf ("Enter class (1, 2, 3, 4, 5n");
scanf("%d", & class);
printf("How many students are in the clas?");
scanf("%d", & amt_students);

return
}

int srecord()
{
struct grades student;
char tname [30],info,info_s;
int choice,i;
int year, semester, clas,csize,i;

printf("Enter the class size");
scanf("%d",&scsize);

if (i[csize]!=0 ;i--)
{
printf ("Enter student's first name:");
scanf ("%s", &student.fname);

printf ("Enter student's surname name:");
scanf ("%s", &student.lname);

printf ("Enter student's age: ");
scanf ("%d", &student.age);

printf ("nEnter the student's gender 1 For Male, 0 For Female:");
scanf ("%d", student.gender);

printf ("Enter the number or cources: ");
scanf ("%d", student.cource);

if (i[student.course]=! 0; i--)
{
pirntf("Enter subject: ");
scanf("%f", student.subject[]);

pirntf("Enter subject's grade: ");
scanf("%f", student.grade[]);
}
else
{

}

}
else
{
printf("Class is full");
}


}
int calcgrade(float student.grade; int csize;float student.course)
{
struct grades student;
int i,totgrade=0;
float avg;

if (i[csize]!=0;i[csize]--)
{
if (i[student.course]=! 0; i--)
{
totgrade=totgrade+student.grade[i];

}
else
{
}

}
else
{

}
}

}

int status( int csize; float avg)
{
struct grades student;
int i,;
float avg;

if (i[csize]!=0;i[csize]--)
{
if (avg=>49)
{
printf("Student has passed")
}
else
{
printf("Student has failed and will repeat this grade")
}
}

}

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: C code christmas assignment we are supposed to create a
Reference No:- TGS0902977

Now Priced at $40 (50% Discount)

Recommended (95%)

Rated (4.7/5)