Pagini recente » Cod sursa (job #1738373) | Cod sursa (job #2059085) | Cod sursa (job #3285736) | Clasament and | Cod sursa (job #652840)
Cod sursa(job #652840)
#include <iostream>
#include<string.h>
#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{char s[1000];
int nr=0,nr1=0,i;
f.get(s,1000);
for(i=0;i<=strlen(s);i++)
if(strchr("qwertyuioplkjhgfdsazxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM",s[i])!=NULL)
nr++;
else
if(strchr("qwertyuioplkjhgfdsazxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM",s[i-1])||strchr("qwertyuioplkjhgfdsazxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM",s[i-2]))
nr1++;
g<<nr/nr1;
return 0;
}