- Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathc-tutorial-struct.cpp
More file actions
Latest commit
32 lines (26 loc) · 596 Bytes
/
Copy pathc-tutorial-struct.cpp
File metadata and controls
32 lines (26 loc) · 596 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Structs
// Learn how to create and use structures.
//
// https://www.hackerrank.com/challenges/c-tutorial-struct/problem
#include<cmath>
#include<cstdio>
#include<vector>
#include<iostream>
#include<algorithm>
usingnamespacestd;
/*
add code for struct here.
*/
structStudent
{
int age;
string first_name;
string last_name;
int standard;
};
intmain() {
Student st;
cin >> st.age >> st.first_name >> st.last_name >> st.standard;
cout << st.age << "" << st.first_name << "" << st.last_name << "" << st.standard;
return0;
}