Cod sursa(job #1363380)

Utilizator george.buneaFMI George Bunea george.bunea Data 26 februarie 2015 22:15:57
Problema Text Scor 20
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include <fstream>
#include <string.h>

using namespace std;

int main()
{
    ifstream f("text.in");
    ofstream g("text.out");

    char s[1024],*p;
    int sum=0,nr=0,i=0;
    f.get(s,1023);
    while(s[i]){
        if(s[i]==' ')
            nr++;
            i++;
    }

    g<<(i-nr+1)/nr;


    return 0;
}