TestingFrenzy

Ex3 C Lab

Nov 11th, 2025
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     char c;
  5.  
  6.     printf("Digitare un char: ");
  7.     scanf("%c",&c);
  8.  
  9.     if (c >47 && c <58) {
  10.         printf("il carattere scritto รจ un numero: %c", c);
  11.     } else if ((c> 64 && c < 91) || (c > 96 && c < 123)) {
  12.         printf("il carattere scritto รจ una lettera dell'alfabeto: %c", c);
  13.     } else {
  14.         printf("il carattere inserito non รจ alfanumerico");
  15.     }
  16.  
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment