Skip to content

Commit

Permalink
Hacktoberfest-2022
Browse files Browse the repository at this point in the history
  • Loading branch information
RathoreUtkarsh authored Oct 31, 2022
1 parent 695f258 commit 2acc616
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions file.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#include <iostream>
using namespace std;

struct student
{
char name[50];
int roll;
float marks;
} s[10];

int main()
{
cout << "Enter information of students: " << endl;

for(int i = 0; i < 10; ++i)
{
s[i].roll = i+1;
cout << "For roll number" << s[i].roll << "," << endl;

cout << "Enter name: ";
cin >> s[i].name;

cout << "Enter marks: ";
cin >> s[i].marks;

cout << endl;
}

cout << "Displaying Information: " << endl;

for(int i = 0; i < 10; ++i)
{
cout << "\nRoll number: " << i+1 << endl;
cout << "Name: " << s[i].name << endl;
cout << "Marks: " << s[i].marks << endl;
}

return 0;
}

0 comments on commit 2acc616

Please sign in to comment.