delich1337

5

May 14th, 2023 (edited)
954
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int change_letter(char*);
  5.  
  6. int main()
  7. {
  8.     char slovo;
  9.     printf("Unesite slovo : ");
  10.     scanf("%c",&slovo);
  11.     int x = change_letter(&slovo);
  12.     printf("Rezultat je %c",x);
  13.  
  14. }
  15.  
  16. int change_letter(char *x){
  17.     char novo;
  18.     if(*x>='A' && *x<='Z'){
  19.         novo = *x+32;
  20.        }else if(*x>='a' && *x<='z'){
  21.         novo=*x-32;
  22.        }else{
  23.        return NULL;}
  24.  
  25.            return novo;
  26.        }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment