fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. void toUpper( std::string &name )
  5. {
  6. for( int i = 0; name[i]; ++i )
  7. if( name[i] >= 'a' && name[i] <= 'z' )
  8. name[i] -= ' ';
  9. }
  10.  
  11. int main()
  12. {
  13. std::string str = "Ideone is an online compiler and debugging tool"
  14. "which allows you to compile source code and execute it online in"
  15. " more than 60 programming languages.";
  16. toUpper( str );
  17.  
  18. std::cout << str << std::endl;
  19. return 0;
  20. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
IDEONE IS AN ONLINE COMPILER AND DEBUGGING TOOLWHICH ALLOWS YOU TO COMPILE SOURCE CODE AND EXECUTE IT ONLINE IN MORE THAN 60 PROGRAMMING LANGUAGES.