hiho week 107 register

Ended

Participants:535

Verdict:Accepted
Score:100 / 100
Submitted:2016-07-16 21:28:05

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <iostream>
#include <string>
#include <fstream>
#include <functional>
#include <algorithm>
using namespace std;
char Upper(char c){
    if (c >= 'a'&&c <= 'z')
        return c - 32;
    else
        return c;
}
char Lower(char c){
    if (c >= 'A'&&c <= 'Z')
        return c + 32;
    else
        return c;
}
int main(){
    ifstream in("C:\\input.txt");
    string s;
    bool sentence = 1;
    while (getline(cin, s)){
        int now = 0;
        bool blank = 0;
        while (now < s.length()){
            if (s[now] >= 'A'&&s[now] <= 'Z' || s[now] >= 'a'&&s[now] <= 'z'){
                if (blank){
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX