Advertisement
Specowy

cz2_zad2

Apr 8th, 2020
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4. #include<ctype.h>
  5. #define LEN 50
  6. void uppercase(char *a);
  7.  
  8. int main()
  9. {
  10.     char t[LEN];
  11.     gets(t);
  12.     uppercase(t);
  13.     return 0;
  14. }
  15.  
  16. void uppercase(char *a)
  17. {
  18. int i;
  19. while (a[i])
  20.     {
  21.          if (isalpha(a[i])= 0)
  22.                 putchar(a[i]);
  23.        
  24.         else
  25.                 putchar(toupper(a[i]));
  26.            
  27.         i++;
  28.     }
  29.        
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement