SHARE
TWEET

Untitled

a guest Mar 21st, 2019 155 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                                              ^
  2. task2.c:12:5: error: conflicting types for 'cashmachine'
  3. int cashmachine(int money){
  4.     ^
  5. task2.c:2:5: note: previous declaration is here
  6. int cashmachine(int money, int *fifty, int *twenty, int *ten);
  7.     ^
  8. task2.c:15:13: warning: format specifies type 'int *' but the argument has type
  9.       'int' [-Wformat]
  10. scanf("%d", money);
  11.        ~~   ^~~~~
  12. task2.c:23:2: error: use of undeclared identifier 'fifty'
  13. *fifty = money/50;
  14.  ^
  15. task2.c:24:2: error: use of undeclared identifier 'twenty'
  16. *twenty = money%50;
  17.  ^
  18. task2.c:25:11: error: use of undeclared identifier 'twenty'
  19. *twenty = twenty/20;
  20.           ^
  21. task2.c:25:2: error: use of undeclared identifier 'twenty'
  22. *twenty = twenty/20;
  23.  ^
  24. task2.c:26:8: error: use of undeclared identifier 'twenty'
  25. *ten = twenty%20;
  26.        ^
  27. task2.c:26:2: error: use of undeclared identifier 'ten'
  28. *ten = twenty%20;
  29.  ^
  30. task2.c:27:8: error: use of undeclared identifier 'ten'
  31. *ten = ten/10;
  32.        ^
  33. task2.c:27:2: error: use of undeclared identifier 'ten'
  34. *ten = ten/10;
  35.  ^
  36. task2.c:29:80: error: use of undeclared identifier 'fifty'
  37.   ...Fifties: %d\nNumber of Twenties: %d\nNumber of Tens: %d\n", &fifty, &twe...
  38.                                                                  ^
  39. task2.c:29:88: error: use of undeclared identifier 'twenty'
  40.  ...%d\nNumber of Twenties: %d\nNumber of Tens: %d\n", &fifty, &twenty, &ten);
  41.                                                                  ^
  42. task2.c:29:97: error: use of undeclared identifier 'ten'
  43.   ...of Twenties: %d\nNumber of Tens: %d\n", &fifty, &twenty, &ten);
  44.                                                               ^
  45. task2.c:35:2: error: expected '}'
  46. }
  47. ^
  48. task2.c:12:27: note: to match this '{'
  49. int cashmachine(int money){
  50.                          ^
  51. 1 warning and 17 errors generated.
  52. Erics-MBP:Lab 19 Eric$
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top