Pagini recente » Cod sursa (job #1623992) | Cod sursa (job #2742758) | Cod sursa (job #996790) | Cod sursa (job #487643) | Cod sursa (job #2595576)
#include<fstream>
#include <iostream>
#include<string.h>
using namespace std;
ifstream fin("input.in");
ofstream fout("output.out");
int main()
{
int n=100, aux=0,c=1, lm=0;
char a;
while (fin>> noskipws>> a) {
if (a == ' ') {
c++;
}
if (a != ' ' && a !=33 && a!=44 && a!=45) {
aux++;
}
cout << a;
}
lm = aux / c;
fout << lm<<" ";
fout << aux<<" ";
fout << c;
return 0;
}