Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n=0,c=0,N=0,s;
- char a[100];
- cin.getline(a,100);
- n='Z'-'A'+1;
- int b[n];
- s=n;
- while(s!=0){
- b[s]=0;
- s--;
- }
- c=0;
- while(a[c]!=0){
- N='A'-a[c];
- b[N]++;
- c++;
- }
- c=0;
- N=0;
- while(a[c]!=0){
- cout<<a[c]<<"-"<<b[N];
- N++;
- c++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement