Advertisement
18126

Day2(ex6)

Jul 7th, 2021
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.85 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main() {
  6.     char symbol1 = '4', symbol2 = 'a', symbol3 = 'u';
  7.     int ascii1 = symbol1, ascii2 = symbol2, ascii3 = symbol3;
  8.     if(ascii1 >= 97 && ascii1 <= 122) {
  9.         printf("%c is a lower-case letter from the alphabet.\n", symbol1);
  10.     } else {
  11.         printf("%c is not a lower-case letter from the alphabet.\n", symbol1);
  12.     }
  13.     if(ascii2 >= 97 && ascii2 <= 122) {
  14.         printf("%c is a lower-case letter from the alphabet.\n", symbol2);
  15.     } else {
  16.         printf("%c is not a lower-case letter from the alphabet.\n", symbol2);
  17.     }
  18.     if(ascii3 >= 97 && ascii3 <= 122) {
  19.         printf("%c is a lower-case letter from the alphabet.\n", symbol3);
  20.     } else {
  21.         printf("%c is not a lower-case letter from the alphabet.\n", symbol3);
  22.     }
  23.     return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement