Advertisement
rotti321

Citire/scriere sir de caractere

May 5th, 2022
760
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///sir de caractere
  2.  
  3. #include <iostream>
  4. #include <cstring>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     char s[101];
  10.     int i;
  11.     cin.getline(s,101);
  12.     for(int i=0;i<strlen(s);i++){
  13.         cout<<s[i]<<" ";
  14.     }
  15.     cout<<endl;
  16.     cout<<s;
  17.     return 0;
  18. }
  19.  
  20.  
  21.  
Advertisement
RAW Paste Data Copied
Advertisement