Advertisement
SSiluRS

F28

Jan 14th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. void main() {
  3.     char str[1000] = "sdffgAdsfdfF sdfdsfSfsd LLL OOO";
  4.     char str2[1000] = "HelLo WorLd";
  5.     for (int i = 0; str[i] != 0; i++)
  6.     {
  7.         if (str[i] >= 'A' && str[i] <= 'Z') {
  8.             printf("0x%X", str[i]);
  9.         }
  10.         else
  11.             printf("%c", str[i]);
  12.     }
  13.     printf("\n");
  14.     for (int i = 0; str2[i] != 0; i++)
  15.     {
  16.         if (str2[i] >= 'A' && str2[i] <= 'Z') {
  17.             printf("0x%X", str[i]);
  18.         }
  19.         else
  20.             printf("%c", str2[i]);
  21.     }
  22.     printf("\n");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement