C Programming Relate Project
Write down the C Programming Code on the basis of your Project. And My Project is
"Bank of MIS"
Following Coding
/*
* C Program to Display the Bank of MIS
*/
#include <stdio.h>
unsigned long amount=10000 , deposit, withdraw;
int choice, pin, k, taka;
char transaction ='y';
void main()
{
while (pin != 1822047)
{
printf("ENTER YOUR BANK ACCOUNT NUMBER PLEASE:\n\n");
scanf("%d", &pin);
if (pin != 1822047)
printf("PLEASE ENTER VALID PASSWORD\n\n");
}
do
{
printf(" ******** WELCOME TO OUR BANK OF MIS **************\n\n\n");
printf("1. Check the Balance 2. Withdraw the Cash 3. Deposit the Cash 4. Quit \n\n");
printf("ENTER YOUR CHOICE PLEASE:\n\n ");
scanf("%d", &choice);
switch (choice)
{
case 1:
printf("\n YOUR BALANCE IN TAKA : %lu ", amount);
break;
case 2:
printf("\n ENTER THE AMOUNT TO WITHDRAW PLEASE: \n\n");
scanf("%lu", &withdraw);
if (withdraw % 100 != 0)
{
printf("\n PLEASE ENTER THE AMOUNT IN MULTIPLES OF 100");
}
else if (withdraw >(amount - 5000))
{
printf("\n SORRY INSUFFICENT BALANCE");
}
else
{
amount = amount - withdraw;
printf("\n\n PLEASE COLLECT THE CASH");
printf("\n YOUR CURRENT BALANCE IN TAKA %lu", amount);
}
break;
case 3:
printf("\n ENTER THE AMOUNT TO DEPOSIT PLEASE\n\n");
scanf("%lu", &deposit);
amount = amount + deposit;
printf("SO , YOUR BALANCE IN TAKA %lu", amount);
break;
case 4:
printf("\n THANK YOU VERY MUCH FOR USING OUR BANK");
break;
default:
printf("\n SORRY INVALID CHOICE");
}
printf("\n\n\n DO YOU WANT TO DO ANOTHER TRANSCATION?(y/n): \n");
fflush(stdin);
scanf("%c", &transaction);
if (transaction == 'n'|| transaction == 'N')
k = 1;
} while (!k);
printf("\n\n THANK YOU SO MUCH FOR USING OUR MIS BANKING SERVICE.....\n\nHOPE WE WILL MEET SOON.......\n\n");
printf("GOOD BYE EVERYONE.......\n\n");
}
Comments
Post a Comment