Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
frequsency
#include <bits/stdc++.h> using namespace std; int main() { int k; char str[400]; cout<<"Enter the sentence:- "<<endl; for(k=0;k<400;k++) {cin>>str[k];} int i=0; int alphabate[26]={};int alphabate2[26]={}; int j,m; while(str[i]!='\0') { if(str[i]>='a' and str[i]<='z') { j=str[i]-'a'; ++alphabate[j]; } if(str[i]>='A' and str[i]<='Z') { m=str[i]-'A'; ++alphabate2[m]; } ++i; } cout<<"Frequency: "<<endl; for(i=0;i<26;i++) { cout<<char(i+'a')<<":"<<alphabate[i]<<" "<<char(i+'A')<<":"<<alphabate2[i]<<endl; } return 0; }
run
|
edit
|
history
|
help
1
Pac update
DBeach Resort 4R8J-8P (State of Rio Grande.do Norte Brazil)
euler tour (by pure theory)
My Tuple class
Lowest common ancestor in binary tree
TPSI Primo esercizio
series kv type 1
345325
base and derr con
Continuous Sub Set with given sum