Cod sursa(job #1020541)
Utilizator | Data | 2 noiembrie 2013 10:53:29 | |
---|---|---|---|
Problema | Text | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
char a[1000];
int main()
{
int i,j,l=0,c=0;
ifstream f("text.in");
ofstream g("text.out");
f.getline(a,1000,'\n\n');
i=strlen(a);
for(j=1;j<=i;j++)
if(isalpha(a[j]))l++;
else c++;
g<<l/(c-2);
}