Advertisement
STANAANDREY

BAC 4/19/2022 2

Apr 19th, 2022 (edited)
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. char s[100];
  4.  
  5. int main() {
  6.     gets(s);
  7.     int between = 0;
  8.     for (int i = 0; s[i]; i++) {
  9.         if (s[i] == '<') {
  10.             between = 1;
  11.         } else if (s[i] == '>') {
  12.             between = 0;
  13.         } else if (between && s[i] != ' ') {
  14.             s[i] -= 32;
  15.         }
  16.     }
  17.     puts(s);
  18.     return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement