Cod sursa(job #1830871)

Utilizator clarasimaSima Clara clarasima Data 17 decembrie 2016 11:07:26
Problema Text Scor 80
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.5 kb
#include <fstream>
#include <cstring>

using namespace std;

ifstream fin("text.in");
ofstream fout("text.out");
int nrcuv,nr,nrc,d,i;
char c,a;
char s[300];

int main()
{
    fin.get(a);
    while(fin.get(c))
    {
        if((c>='a'&&s[i]<=c)||(c>='A'&&c<='Z'))
        {
            nrc++;
            if(!(((a>='a'&&s[i]<=a)||(a>='A'&&a<='Z'))))
                nrcuv++;

        }
        a=c;
    }
  //  fout<<nrc<< ' '<<nrcuv<< '\n';
    fout<<nrc/nrcuv << '\n';
    return 0;
}