Cod sursa(job #2101010)
Utilizator | Data | 6 ianuarie 2018 18:14:30 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.52 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f ( "text.in" );
ofstream g ( "text.out" );
char v[] = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
bool ok = false;
int main()
{
char s;
int nrcuv=0;
int lgtotal=0;
while ( f.get(s) )
if(strchr(v,s)!=0)
{
lgtotal ++ ;
if ( ok == false )
{
ok = true;
nrcuv ++;
}
}
else ok=false;
g <<lgtotal<<" "<<nrcuv;
return 0;
}