So heres the scoop. I need to take this code:

Code:
```#include "stdio.h"
#include "conio.h"

int value,rem,bill_50,bill_20,bill_10;
void dispenser();

int main(void)
{
printf("**Welcome**\n\n");
dispenser();
getch();
}
void dispenser()
{
int a,b;
printf ("Enter the amount you wish to withdrawl\n");
scanf("%d",&value);

if(((value%10)==0) && (value>0))
{
//Calculates 50s
if(value>=50)
{
bill_50 = value/50;
value = value%50;
printf ("No of 50 Bills is %d \n",bill_50);
}
//Calculates 20s
if((value>=20) && (value<50))
{
bill_20 = value/20;
value = value%20;
printf ("No of 20 Bills is %d \n",bill_20);
}
//Calculates 10s
if(value==10)
{
bill_10 = 1;
value = value%10;
printf ("No of 10 Bills is %d \n",bill_10);
}
printf("Press 1 for a new transaction and 0 to exit\n");
scanf("%d",&a);

if(a == 1)
{
dispenser();
}
if(a == 0)
{
printf("Thank you!!");
exit(0);
}

}
/*Safety for increments of 10*/
else
{
printf ("Please Enter in Multiples 10 only, thank you \n\n");
dispenser();
}

}```
and I have to meet my teacher's demands to have it use pointers, and to pass the variables to the function instead of just using global variables.

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.