Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fc9b836

Browse files
Add files via upload
1 parent 10cde2d commit fc9b836

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include <stdio.h>
2+
struct student
3+
{
4+
char name[50];
5+
int roll;
6+
float marks;
7+
};
8+
struct student s;
9+
int main()
10+
{
11+
printf("\tEnter information:\n");
12+
printf("\nEnter name: ");
13+
fgets(s.name,sizeof(s.name),stdin);
14+
printf("Enter roll number: ");
15+
scanf("%d",&s.roll);
16+
printf("Enter marks: ");
17+
scanf("%f",&s.marks);
18+
19+
printf("\n\tDisplaying Information:\n");
20+
printf("\nName: ");
21+
printf("%s",s.name);
22+
printf("Roll number: %d\n",s.roll);
23+
printf("Marks: %.1f\n",s.marks);
24+
return 0;
25+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /