Hi Experts,
I've got a school assigment in c language programming but this course is new to me.
Q. Create 5 users - the 5th user would be the admin
Admin would have privilledge to view user profile and disable user account.
User Profile:
Name, D.O.B, Gender, Occupation, Contact, Income p/n...etc.
To be true I don't uderstand how to add this to this program;
#include<stdio.h>
int x; char y;
float with,bal = 880000.80f,dep;
void withdraw(void); void deposit(void);
void balance(void);
void main()
{
clrscr();
printf("##########################MAYBANK##########################");
printf("\n\n\t##To Check Balance: Press 1");
puts("\n\n\t##To Withdraw: Press 2");
puts("\n\n\t##To Deposit: Press 3");
puts("\n\n\t##ENTER YOUR CHOICE: ");
scanf("%d",&x);
switch(x)
{
case 1: balance(); break;
case 2: withdraw(); break;
case 3: deposit(); break;
default: printf("\n\n\t\tINVALID INPUT SELECTION");
getch();
}
getch();
}
void balance()
{
clrscr();
printf("Your Current Amount Is: PGK %.2f",bal);
getch();
main();
}
void withdraw()
{
clrscr();
printf("##########################MAYBANK##########################");
printf("\n\n\t\tENTER AMOUNT: PGK "); scanf("%f",&with);
if(with>bal)
{
printf("\n\n\t\tAMOUNT INSUFFICIENT FOR WITHDRAWL");
getch();
withdraw();
}
else
bal-=with;
printf("\n\n\t\tWITHDRAW SUCCESSFUL YOUR CURRENT BALANCE IS NOW: %.2f",bal);
printf("\n\n\t\tDo You Want To Make Another Withdrawl ? Y/N ");
y=getch();
if(y=='y'||y=='Y')
withdraw();
else
printf("\n\n\t\tTHANKYOU FOR BANKING WITH MAYBANK...");
}
void deposit()
{
clrscr();
printf("##########################MAYBANK##########################");
printf("\n\n\t\t");
printf("\n\n\t\t");
}