Advertisement
lucontre

lab 4 problrma 1

May 10th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int suma(char); //declaro prototipo de funcion
  5.  
  6. int main()
  7. {
  8.     char i;
  9.     int out;
  10.     printf("ingrese numero\n");
  11.     scanf("%c",&i);
  12.     out = esNumero(i);
  13.     if(out == 1)
  14.         printf("si");
  15.     else
  16.         printf("no");
  17.  
  18. return 0;
  19. }
  20.  
  21. int esNumero(c){ // HAORA declaro la funcion
  22.     if(c>=48 && c<=57){
  23.      return 1;
  24.     }
  25. else return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement