TOPIC

Não consigo achar os 20% de erro que me dá.

[GAD] Pedro Faria asked 4 years ago

#include <bits/stdc++.h>
using namespace std;
int main(){
string frase;
string vogais;
                    while(cin>>vogais){

                        getline(cin,frase);
                        int c=0;
                        for(int i=0;i<vogais.length();i++){
                            for(int j=0;j<frase.length();j++){
                                if(vogais[i] == frase[j])
                                    c++;
                            }
                        }
                        cout << c << endl;
                        c=0;
                    }
return 0;
}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.