daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int read_int(int *number)
  2. {
  3.     int ret;
  4.     if (number == NULL) { // Tarkistetaan annetu osoitin
  5.         return -1; // Osoittimen ollessa epäkelpo, funktiosta poistutaan
  6.     }
  7.     ret = scanf("%d", number);
  8.     if (ret != 1) { // Tarkistetaan onnistuiko lukeminen
  9.         return -1;
  10.     }
  11.     return ret;
  12. }
RAW Paste Data
Top