![]() |
Desperate plee for Help. C program for ATM.
So heres the scoop. I need to take this code:
Code:
#include "stdio.h"I have NO idea how to do this. I can't program to save my life, I got this code from my roommate lol. If anyone can give me an idiot friendly step by step guide, or could just be gracious and fix it, I would be eternally grateful. |
Re: Desperate plee for Help. C program for ATM.
OK, so the first step is to make the variables local to main, so change:
Code:
int value,rem,bill_50,bill_20,bill_10;Code:
void dispenser();Then within dispenser, change the references to these variables from simple "value" references to pointer references, i.e. "*value" (assuming you keep the same names). For example: Code:
if(*value>=50) |
| All times are GMT +5.5. The time now is 22:23. |