fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(void)
  6. {
  7. char c;
  8. while(cin.get(c) && c != '\n')
  9. {
  10. if(c >= 'a' && c <= 'z')
  11. c += 'A' - 'a';
  12. cout << c;
  13. }
  14. cout << endl;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.02s 2684KB
stdin
Hello world!
stdout
HELLO WORLD!