SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     char s[256];
  8.     int x[26] = {0};
  9.     cin>>s;
  10.     int i =0;
  11.     while(s[i]!= '\0'){
  12.         x[s[i]-'A']++;
  13.         i++;
  14.     }
  15.     for(int i = 0; i<26;i++)
  16.       if(x[i])
  17.         cout<<"caracterul "<<char (i+'A')<<" apare de "<<x[i]<<" ori \n";
  18.     return 0;
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top