#include <stdio.h>
struct student
{
    char name[30];
    int rollno;
    int m[3];
    int t;
    float avg;
}s;
int main()
{
    int i; 
    printf("\n\t\tSingle Student Mark List.");
    printf("\n\t\t------------------------");
    printf("\nEnter the Student Name : ");
    scanf("%s",&s.name);
    printf("\nEnter the Student Roll Number : ");
    scanf("%d",&s.rollno);
    printf("\nWe need the three marks...");
    for(i=0;i<3;i++)
     {
         printf("\n\tEnter the Mark%d : ",i+1);
         scanf("%d",&s.m[i]);
     }
    s.t=s.m[0]+s.m[1]+s.m[2];
    s.avg=s.t/3;
    printf("\nThe Student Mark list is...");
    printf("\nStudent Name : %s ",s.name);
    printf("\nStudent Roll Number : %d",s.rollno);
    printf("\nStudent Marks...");
    for(i=0;i<3;i++)
     {
        printf("\n\tMark%d : %d",i+1,s.m[i]);
     }
    printf("\nTotal of the Marks : %d",s.t);
    printf("\nAverage of the Marks : %.2f",s.avg);
    printf("\n\n\tProgram End...\n");
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: