├── CP PROJECT.c └── Project Proposal Sample.docx /CP PROJECT.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void Transaction(){ 5 | 6 | int balance = 1000, Newbalance, anotherTransaction, choice, amountToWidthdraw, amountToDeposit; 7 | 8 | printf("\n*************\"Welcome to MA Bank ATM Service\"**************\n"); 9 | 10 | printf("1-> Withdraw Cash\n"); 11 | 12 | printf("2-> Deposit Cash\n"); 13 | 14 | printf("3-> Check Balance\n"); 15 | 16 | printf("4-> Quit\n"); 17 | 18 | printf("********************************************\n\n"); 19 | 20 | printf("Enter your choice: "); 21 | 22 | scanf("%d", & choice); 23 | 24 | switch(choice){ 25 | 26 | case 1: // Withdraw 27 | 28 | printf("Please enter amount to withdraw: "); 29 | 30 | scanf("%d", &amountToWidthdraw); 31 | 32 | if(amountToWidthdraw > balance){ 33 | 34 | printf("There is no insuffient funds in your account"); 35 | 36 | printf("\n\nDo you want another transaction?\nPress 1 to proceed and 2 to exit\n\n"); 37 | 38 | scanf("%d", &anotherTransaction); 39 | 40 | if(anotherTransaction == 1){ 41 | 42 | Transaction(); 43 | 44 | } 45 | 46 | } 47 | 48 | else{ 49 | 50 | balance = balance - amountToWidthdraw; 51 | 52 | printf("You have withdrawn %d and your new balance is %d ", amountToWidthdraw, balance); 53 | 54 | printf("\n\nDo you want another transaction?\nPress 1 to proceed and 2 to exit\n\n"); 55 | 56 | scanf("%d", &anotherTransaction); 57 | 58 | if(anotherTransaction == 1){ 59 | 60 | Transaction(); 61 | } 62 | 63 | } 64 | 65 | break; 66 | 67 | case 2: // DEPOSIT 68 | 69 | printf("Please enter amount to deposit: "); 70 | 71 | scanf("%d", &amountToDeposit); 72 | 73 | Newbalance = amountToDeposit + balance; 74 | 75 | printf("Thank you for depositing, new balance is: %d", Newbalance); 76 | 77 | balance == Newbalance; 78 | 79 | printf("\n\nDo you want another transaction?\nPress 1 to proceed and 2 to exit\n\n"); 80 | 81 | scanf("%d", &anotherTransaction); 82 | 83 | if(anotherTransaction == 1){ 84 | 85 | Transaction(); 86 | 87 | } 88 | 89 | break; 90 | 91 | case 3: // BALANCE 92 | 93 | printf("Your bank balance is: %d", balance); 94 | 95 | printf("\n\nDo you want another transaction?\nPress 1 to proceed and 2 to exit\n\n"); 96 | 97 | scanf("%d", &anotherTransaction); 98 | 99 | if(anotherTransaction == 1){ 100 | 101 | Transaction(); 102 | 103 | } 104 | 105 | break; 106 | 107 | case 4: 108 | 109 | printf("\n\n****************************\"THANK YOU TO USING OUR ATM SERVICES\"************************\n"); 110 | 111 | } 112 | 113 | } 114 | 115 | 116 | 117 | int main(){ 118 | 119 | Transaction(); 120 | 121 | return 0; 122 | } 123 | -------------------------------------------------------------------------------- /Project Proposal Sample.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mustafa-Hassan2001/Computer-Programming-Project-ATM-Machine-System/e77b103d26f854b61426b5678da98ddf2e32bf26/Project Proposal Sample.docx --------------------------------------------------------------------------------