CPP   20

strings chars

Guest on 20th April 2022 02:03:37 AM

  1. #include <iostream>
  2. #include <string>
  3. #include <ctype.h>
  4. using namespace std;
  5. int main() {
  6.  
  7.     string sentence="harry";
  8.  
  9.     sentence[0]=toupper(sentence[0]);
  10.  
  11.     cout << sentence << endl;
  12.  
  13. }

Raw Paste


Login or Register to edit or fork this paste. It's free.