Advertisement
Spocoman

2. Remove Invalid

Jan 29th, 2024
1,151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. // TARIKAT EDITION :)
  2.  
  3. #include <iostream>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     string line;
  11.     getline(cin, line);
  12.  
  13.     while (line != "end") {
  14.         if (isdigit(line[0])) {
  15.             cout << line << endl;
  16.         }      
  17.         getline(cin, line);
  18.     }
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement