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;


10 views0 comments

Recent Posts

See All

Solubility - CodeChef Solution in Java and C++| AskTheCode

CodeChef May Long Challenge Solution | Solubility (SOLBLTY) solution | AskTheCode Solubility (SOLBLTY) solution Problem: Suppose for a unit rise in temperature, the solubility of sugar in water increa

Valid Paths CodeChef Solution in C++ | AskTheCode

CodeChef May Long Challenge Solution | Valid Paths (VPATH) solution | AskTheCode Valid Paths (VPATH) CodeChef solution Problem: You are given a tree with N nodes numbered from 1 to N. A set S of nodes