Computer Science, asked by Prathamesh1810, 11 months ago

Write a program to declare structure student having roll no, name & marks. Accept & display

data for 3 students. (c programming)​

Answers

Answered by abhishekabhia
9

Answer:

#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();

}

Explanation:

this is ur ans

Similar questions