Verify password and convert currency

I have a problem here.I was asked by my teacher to make a program to enter password and if password right I can change the curency. I only want to change from ringgit malaysia to us dollar.The program can convert currency many times.I only want to use stdio.h

#include <stdio.h>
void main()
{
int pass;
printf("Input your password");
scanf("%d",$pass);
if (pass==4782)
{printf("You can continue\n");
}
else
{printf("Wrong try again\n);
}
After this what should I put to complete this program?
Thanks
You could make a separate function that implements all the converting stuff, and then call it only if the user entered the correct password, otherwise ask for the password again.
please give me an example because I don't know much about programmming
Last edited on
Topic archived. No new replies allowed.