Cod sursa(job #1321484)
Utilizator | Data | 19 ianuarie 2015 10:46:03 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
int main()
{
char s [52],*p = " ";
int nr=0,nr2=0;
ifstream f("text.in");
ofstream g ("text.out");
f.getline(s,256);
while (s!=p)
{nr++;
s+1;
}
if (s==p)
nr2++;
g<<nr/nr2;
g.close();
f.close();
return 0;
}