VelizarAng

Day2 - Задачи 6, 7 & 8

Jul 6th, 2021 (edited)
746
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int isLower(char sym){
  5.     if(sym >= 'a' && sym <= 'z'){
  6.        printf("Yes");
  7.     }else{
  8.        printf("No");
  9.     }
  10. }
  11.  
  12. int isUpper(char sym){
  13.     if(sym >= 'A' && sym <= 'Z'){
  14.         printf("Yes");
  15.     }else{
  16.         printf("No");
  17.     }
  18. }
  19.  
  20. int isLetter(char sym){
  21.     return isLower(sym) || isUpper(sym) ? "Yes" : "No";
  22. }
  23.  
  24. int main(){
  25.     printf("%c\n", isLower('3'));
  26.     printf("%c\n", isUpper('B'));
  27.     printf("%c\n", isLetter('f'));
  28.  
  29.     return 0;
  30. }
Add Comment
Please, Sign In to add comment