Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In C please, Thank you Design a program using random file for 10 students, the r

ID: 3765767 • Letter: I

Question

In C please, Thank you

Design a program using random file for 10 students, the record for each student must have the next structure: record_Number, student_Name (15 characters), first_Grade, second _Grade, and average_Grade. The numeric grades must be from 1.0 to 10.0. Data will be store in student.dat

Develop functions: CreateFile, Menu,

a) Capture_Data

b) Print_Records

c) Calculate average_Grade for all students and print them.

d) Consulting Monthly Grades from a range, example from 8 to 9, and print them.

e) Search by Last Name or FistName and print the record found

f) Sort record based in Last Name from Z to A or from A to Z and print them.

g) Update any record, allowing grade changes. Print each record before/after changes.

h) Insert new information or delete. Print each record before and after changes.

i) Exchange information from one with another record, and print all before and after.

If program is too long, the menu can be designed to work from options 1 through 5 (or a through e). Thanks

record_Number student_Name first_Grade second_Grade average_Grade 1 Frederick 8.0 8.5 2 Chase 9.5 8.5 3 Melissa 10.0 9.0 4 David 7.5 9.0 5 Ryan 9.5 8.5 6 Erick 10.0 10.0 7 Joshua 8.0 9.5 8 Marc 9.5 10.0 9 Sadeer 8.5 9.5 10 Karen 10.0 8.0

Explanation / Answer

#include<stdio.h>

#include<conio.h>

struct student

{

int rollno;

char name[15];

int m1,m2;

float average;

};

struct student s[20],t;

void main()

{

int i,j,n;

clrscr();

printf(" enter the limit");

scanf("%d",&n);

for(i=0;i<n;i++)

{

printf(" enter the roll no ");

scanf("%d",&s[i].rollno);

printf(" enter the name ");

scanf("%s",s[i].name);

printf(" enter the mark 1=");

scanf("%d",&s[i].m1);

printf(" enter the mark 2=");

scanf("%d",&s[i].m2);

s[i].average=(s[i].m1+s[i].m2/2;

}
printf(" display in desending order ");
for(i=0;i<n;i++)
{
printf(" rollno=%d",s[i].rollno);

printf(" name=%s",s[i].name);

printf(" mark1=%d",s[i].m1);

printf(" mark2=%d",s[i].m2);

printf(" average=%f",s[i].average);

}

getch();

}