Advertisement
Spocoman

01. Student Information

Nov 2nd, 2023
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     string name;
  8.     getline(cin, name);
  9.  
  10.     int age;
  11.     cin >> age;
  12.  
  13.     double grade;
  14.     cin >> grade;
  15.  
  16.     printf("Name: %s, Age: %i, Grade: %.2f", name.c_str(), age, grade);
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement