Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- using namespace std;
- int main()
- {
- int N, k = 0;
- cin >> N;
- char a;
- a = getchar();
- string s = "";
- if (N > 0) {
- for (int i = 0; i < 100; i++) {
- a = getchar();
- if (a == '\n') break;
- if (a == ' '){
- s+=a;
- k = 0;
- continue;
- }
- if ((k == 0) and (a > 96)) s+=a-32;
- if ((k == 0) and (a < 96)) s+=a;
- if ((k > 0) and (a > 96)) s+=a;
- if ((k > 0) and (a < 96)) s+=a+32;
- k++;
- }}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement