C Program to Display the ATM Transaction
C Program to Display the ATM Transaction. #include <stdio.h> unsigned long amount = 1000 , deposit , withdraw ; int choice , pin , k ; char transaction = 'y' ; void main ( ) { while ( pin != 1520 ) { printf ( "ENTER YOUR SECRET PIN NUMBER:" ) ; scanf ( "%d" , & pin ) ; if ( pin != 1520 ) printf ( "PLEASE ENTER VALID PASSWORD \n " ) ; } do { printf ( "********Welcome to ATM Service************** \n " ) ; printf ( "1. Check Balance \n " ) ; printf ( "2. Withdraw Cash \n " ) ; printf ( "3. Deposit Cash \n " ) ; printf ( "4. Quit \n " ) ; printf ( "******************?**************************?* \n \n " ) ; printf ( "Enter your choice: " ) ; scanf ( "%d" , & choice ) ; switch ( choice ) { case 1 : printf ( " \n YOUR BALANCE IN Rs : %lu " , amount ) ; bre...
Comments
Post a Comment