#include<stdio.h>
#include<conio.h>
main()
{
int roll_no,m1,m2,m3,total;
float average;
clrscr();
printf("Enter roll number : ");
scanf("%d",&roll_no);
printf("Enter marks 1 : ");
scanf("%d",&m1);
printf("Enter marks 2 : ");
scanf("%d",&m2);
printf("Enter marks 3 : ");
scanf("%d",&m3);
total=m1+m2+m3;
average=total/3.0;
printf("\nStudent Roll Number : %d",roll_no);
printf("\nMarks 1 : %d",m1);
printf("\nMarks 2 : %d",m2);
printf("\nMarks 3 : %d",m3);
printf("\nTotal : %d ",total);
printf("\nAverage : %f ",average);
getch();
}
Plz send me the program accepts the rollnumber, name, 6subjects marks, total, average and display (roll number, name, total, average)
Hi nilofer, use this same program, you have to modify it a little.
plz send me a program that accepts ten names of students with five marks each and it calculates the sum and average of each student.
Please do with array
Pls send me code that names 5 students, 3 subject marks each and total of all subjects.
Also explain it. Thank you.
This requires structures, refer the programs in then. Also, practise and try to write programs by yourself. Important is to understand the logic, your exams may not the same programs asked.