Cod sursa(job #1630745)

Utilizator dragos231456Neghina Dragos dragos231456 Data 5 martie 2016 11:04:39
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
char x;
int s,s1;
int main()
{
    ifstream f("text.in");
    ofstream g("text.out");
    while(f.get(x))
    {
    if(x==' ') s1++;
    if((x>='A' && x<='Z')||(x>='a' && x<='z')) s++;
    }
    s1++;
    cout<<s<<" "<<s1;
    return 0;
}