Pagini recente » Cod sursa (job #600983) | Cod sursa (job #1445450) | Cod sursa (job #1287062) | Cod sursa (job #2189245) | Cod sursa (job #761183)
Cod sursa(job #761183)
/*#include <iostream>
using namespace std;
void half_main1(const int& beg, const int& end)
{
int k=(end+1)/2, l, m;
for(int i=0; i<k; i++)
{
for(l=0; l<k-i; l++)
cout << " ";
for(m=0; m<2*i+1; m++)
cout << "*";
cout << endl;
}
}
void half_main2(const int& beg, const int& end)
{
int k=(beg+1)/2, l, m;
for(int i=k; i>0; i--)
{
for(l=0; l<k-i+1; l++)
cout << " ";
for(m=0; m<2*i-1; m++)
cout << "*";
cout << endl;
}
}
void biscuite(int n)
{
half_main1(0, n-2);
for(int i=0; i<n; i++)
cout << "*";
cout << endl;
half_main2(n-2, 0);
}
int main()
{
int n;
cin >> n;
biscuite(n);
}*/
#include <fstream>
using namespace std;
char v;
unsigned cuv, lcuv;
fstream f;
int main()
{
f.open("text.in", ios::in);
while(!f.eof())
{
f >> c;
if(!(c>='A' && c<='z'))
cuv++;
else if(c>='A' && c<='z')
lcuv++;
}
f.close();
f.open("text.out", ios::out);
f << lcuv/cuv << endl;
f.close();
}