Hacker Rank solution for Structs In C++

Asked: Anonymously | Category: C++

#include <cmath>

#include <cstdio>

#include <vector>

#include <iostream>

#include <algorithm>

using namespace std;

struct Student

{

int age,standard;

string first_name,last_name;

};

int main() 

{

Student st;

cin >> st.age >> st.first_name >> st.last_name >> st.standard;

cout << st.age << " " << st.first_name << " " << st.last_name << " " << st.standard;

return 0;

}


4 views

Recent Posts

See All

"Believe you can and you're halfway there"