Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cstring>
- #include <cmath>
- using namespace std;
- // ifstream fin ("bac.txt");
- // ofstream fout("iesire.txt");
- int main(){
- char s[255];
- char voc[]="AEIOU";
- char *p;
- int i, nr=0, fr[150]={0};
- cin.get(s,255);
- char s2[255];
- strcpy(s2,s);
- p=strtok(s," ");
- while(p){
- nr++;
- p=strtok(NULL," ");
- }
- for(i=0;i<strlen(s2);++i){
- if(strchr(voc,s2[i])==NULL){
- fr[(int)s2[i]]=1;
- }
- }
- cout<<nr<<endl;
- for(i=(int)'A';i<=(int)'Z';++i){
- if(fr[i]==1){
- cout<<(char)fr[i]<<" ";
- }
- }
- // fin.close();
- // fout.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement