PROGRAM on ATM MACHINE TRANSACTION with PM CARES FUND DONATION OPTION- EASY CODES- The Indian Creators.
Hello guys! Welcome to this Blog.
Today you'll be going through the journey of Coding in C LANGUAGE.
To run this program you'll need TURBO Software if you have computer or laptop.
If you have mobile phone (Android or Ios) you can download any compiler app from Play store or App Store.
Just Copy this code and enjoy your program.
If you want more and simple programs like this then comment below and share it your friends, so that they can also make their own program. Follow me now.
Copy and Paste this code in your compiler.
#include <stdio.h>
int main()
{
float a,b;
char ch;
printf("enter the initial amount:\n");
scanf("%f", &a);
printf("enter \nc for credit \nd for debit \nb for balance \nx for delete your money \nh to donate in PM CARES Fund \n");
scanf("\n%c", &ch);
switch(ch)
{
case 'c':
printf("enter credit amount;\n");
scanf("%f", &b);
a=a+b;
printf("New amount = %f",a);
break;
case 'd':
printf("Enter the debit amount:\n");
scanf("%f", &b);
if(a>=b)
{
a = a-b;
printf("New amount = %f", a);
}
else
printf("Insufficient amount in your account. Transaction Failed. \n");
break;
case 'b':
printf("Amount in your account: %f", a);
break;
case 'x':
printf("Are you sure to delete your money? Enter any digit:");
scanf("%f", &b);
a=a*0;
printf("Your money is deleted successfully: %f", a);
break;
case 'h':
printf("Enter the amount you want to Donate:");
scanf("%f", &b);
if(a>=b)
{
a = a-b;
printf("Remaining Amount in your account.\n Thanks for Donation. \n Stay Safe, Stay Home.= %f", a);
}
else
printf("Insufficient amount in your account. Transaction Failed. \n");
break;
default:
printf("Choose correct option.");
}
return 0;
}
-----------------------------------------------------------------------------------------------------------------------------------
Thanks Guys!
Follow me now to get awesome posts like this.
Cheers.
Manas Bhanwar
The Indian Creators.
Post a Comment
Comment your queries below.