//Pass the information of 3 students using structure variable
#include<stdio.h>
struct student
{
char name[20];
int rollno;
float marks;
}s1;
int main()
{
struct student s2,s3;
printf("Enter Name of student 1=");
scanf("%s",s1.name);
printf("Enter the roll no of student 1=");
scanf("%d",&s1.rollno);
printf("Enter the marks of student 1=");
scanf("%f",&s1.marks);
printf("Detail of student 1------>\n");
printf("\n\n");
printf("Enter Name of student 2=");
scanf("%s",s2.name);
printf("Enter the roll no of student 2=");
scanf("%d",&s2.rollno);
printf("Enter the marks of student 2=");
scanf("%f",&s2.marks);
printf("\n\n");
printf("Enter Name of student 3=");
scanf("%s",s3.name);
printf("Enter the roll no of student 3=");
scanf("%d",&s3.rollno);
printf("Enter the marks of student 3=");
scanf("%f",&s3.marks);
printf("\nDetail of student 1------>\n");
printf("Name=%s\nRollNo=%d\nMarks=%f\n",s1.name,
s1.rollno,s1.marks);
printf("\nDetail of student 2------>");
printf("\nName=%s\nRollNo=%d\nMarks=%f\n",s2.name,
s2.rollno,s2.marks);
printf("\nDetail of student 3------>");
printf("\nName=%s\nRollNo=%d\nMarks=%f\n",s3.name,
s3.rollno,s3.marks);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: