Advertisement
Niloy007

Siam 3

Jun 12th, 2021
838
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <ctype.h>
  4.  
  5. int main()
  6. {
  7.     char ch[10000];
  8.     printf("Assalamu Alaikum, Type your feelings bellow:\n");
  9.     gets(ch);
  10.     int i = 1;
  11.  
  12.     ch[0] = toupper(ch[0]);
  13.     while (ch[i] != '\0') {
  14.         if (ch[i] == ' ') {
  15.             ch[i + 1] = toupper(ch[i + 1]);
  16.             i++;
  17.         }
  18.         i++;
  19.     }
  20.     printf("%s\n", ch);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement