I have an ATM program.. and as a project my prof. ask me to make an ATM in a system??? it is possible that my ATM will store username and password?? and it save all the transaction in a notepad?? anyone give me a reference where I get some codes to apply on my program.. and as a big help if anyone has already done with this?? please give me an example...
here's my very simple ATM program..
Code:
#include <stdio.h>
#include <conio.h>
double amount=10000;
double dep(double y)
{
double account;
account=amount+y;
return account;
}
double with(double x)
{
double account,y;
y=amount;
account=amount-x;
if(x>4000)
printf("The largest amount you can withdraw is 4000\n");
else if(x>amount)
printf("The smallest amount you can withdraw is 200\n");
else
amount=amount-x;
printf("%lf",amount);
return 0;}
void main()
{
int i=0;
double x;
double y;
clrscr();
printf("\n*******MENU*********\n");
printf("1.Balance Enquiry\n");
printf("2.Withdraw\n");
printf("3.Deposit\n");
printf("4.Exit\n");
printf("Select an item from the menu: ");
scanf("%d",&i);
while(i<4)
{
switch(i)
{
case 1:printf("This is your balance amount: %f",amount);
break;
case 2:printf("How much would you like to withdraw?");
scanf("%lf",&y);
//amount = amount-y;
with(y);
//printf("This is your balance amount: %f",amount);
break;
case 3:printf("How much amount do want to deposit?\n");
scanf("%lf",&x);
amount = amount+x;
printf("This is your balance amount: %f",amount);
break;
}
printf("\n*********MENU*********...\n");
printf("1.Balance Enquiry\n");
printf("2.Withdraw\n");
printf("3.Deposit\n");
printf("4.Exit\n");
printf("If you are a first time user please deposit some amount for balance enquiry.\n");
printf("Select an item from the menu: ");
scanf("%d",&i);
}
getch();
}
This program is 100% working..
but...
I don't know how to start...
this is our last project, and this is the hardiest program for me..