Advertisement
Josif_tepe

Untitled

Oct 23rd, 2024
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Student {
  5.     int id, age, grade;
  6.     float gpa;
  7.    
  8. };
  9.  
  10. int main() {
  11.    
  12.     Student s;
  13.     s.id = 100;
  14.     s.age = 30;
  15.     s.grade = 4;
  16.     s.gpa = 9.58;
  17.    
  18.     cout << s.id << " " << s.age << " " << s.grade << " " << s.gpa << endl;
  19.    
  20.  
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement