fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string srank="Ace of Spades";
  6. string nsrank;
  7.  
  8. nsrank.resize(srank.length());
  9.  
  10. for(unsigned int i = 0; i < srank.length(); i++) {
  11. char temp = srank[i];
  12. nsrank[i] = tolower(srank[i]);
  13. }
  14. cout << nsrank << endl;
  15. return 0;
  16. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
ace of spades