Tuesday, 25 August 2020

HOW TO WRITE ATM PROGRAM IN C?

MANY OF THEM WOULD HAVE CONFUSION THAT CAN WE CODE ABOUT ATM PROGRAM? IS IT POSSIBLE TO CODE?.

SO THE PROBLEMS ARE SOLVED.
THE FOLLOWING PROGRAM IS USED TO CODE ABOUT ATM PROGRAM.
ENJOY THIS PROGRAM BY TYPING THIS CODE.

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int c,d,pin;
char ch;
clrscr();
printf("\t\t\t\tATM program.\n");
printf("\t\tEnter the pin number\n");
printf("\n");
printf("\t\t\t 1  2  3\n");
printf("\t\t\t 4  5  6\n");
printf("\t\t\t 7  8  9\n");
printf("\t\t\t    0   \n");
printf("\n");
scanf("\t\t\t%d",&pin);
if(pin==1357)
{
printf("\n");
}
else
{
while(pin!=1357)
printf("Incorrect pin...\n");
}
printf("\t\tEnter Debit or Credit\n");
scanf("\t\t%s\n",&ch);
if(ch==d)
{
printf("\t\tEnter d for debit\n");
scanf("\t\t%d\n",&d);
}
else
{
if(ch==c)
{
printf("\t\tEnter c for credit\n");
scanf("\t\t%d\n",&c);
}
printf("\t\t\tEnter the amount you want to %s",ch);
scanf("\t\t%d\n",&c,&d);
printf("\n");
printf("\t\t\tYour amount Rs.%d is processing\n",c,d);
printf("\n");
printf("\t\t\tplease wait bill is processing...\n");
printf("\n");
printf("\t\t\tThankyou...\n");
}
getch();
}

SO I THINK YOU ENJOYED A LOT BY CODING THIS PROGRAM. SO  PLEASE COMMENT HOW IT WAS IN THE COMMENT BOX.
                                                                             -THANKYOU. 

No comments:

Post a Comment

C Programming

What is DBMS in brief?

A Database Management System (DBMS) is a software suite designed to efficiently manage, organize, store, manipulate, and retrieve data. It a...