MUstar

IoT C언어 0424 - 7-2

Apr 24th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. #include <stdio.h>
  2. int get_pos(void);
  3.  
  4. int main(void)
  5. {
  6.     int res;
  7.  
  8.     res = get_pos();
  9.     printf("변환값 : %d\n",res);
  10.     return 0;
  11. }
  12.  
  13. int get_pos(void)
  14. {
  15.     int pos;
  16.  
  17.     printf("양수입력 : ");
  18.     scanf("%d", &pos);
  19.     return pos;
  20. }
Add Comment
Please, Sign In to add comment