Include Include Include Struct Student Char Name 30 Char Address 50 Char Phno 20 Float Mar Q43780327
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
struct student
{
char name[30];
char address[50];
char phno[20];
float marks[5];
};
void program();
void main
{
program();
}
void program()
{
int i;
float total=0.0,per;
struct student st;
printf(“Enter student detailsn”);
printf(“Enter Name:”);
gets(st.name);
printf(“Enter Address:”);
gets(st.address);
printf(“Enter Phone number:”);
gets(st.phno);
printf(“Enter student marks:n”);
for(i=0;i<5;i++)
{
scanf(“%f”,&st.marks[i]);
total+=st.marks[i];
}
per=(total/5)
system(“cls”);
printf(“Student name: %sn”,st.name);
printf(“Address: %sn”,st.address);
printf(“Phone Number: %sn”,st.phno);
printf(“Total Marks: %sn”,total);
printf(“Percentage: %sn”,per);
if(per>80)
{
printf(“Grade:A+”);
}
else if (per>70 && per<60)
{
printf(“Grade:A”);
}
else if (per>60 && per<65)
{
printf(“Grade:B+”);
}
else if (per>60 && per<50)
{
printf(“Grade:B”);
}
else if (per>50)
{
printf(“Grade:C”);
}
else
{
printf(“Grade:F”);
} getche(); }
make a simplified and shorter version of this code
Expert Answer
Answer to #include #include #include struct student { char name[30]; char address[50]; char phno[20]; float marks[5]; }; void prog…
OR