Structs

  • + 0 comments

    My C++ code 😎😁

    #include <cmath>
    #include <cstdio>
    #include <vector>
    #include <iostream>
    #include <algorithm>
    using namespace std;
    
    /*
        add code for struct here.
    */
    
    typedef struct Student Student;
    struct Student {
        int age;
        int standard;
        string first_name;
        string 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;
    }