#include<iostream.h> #include<stdio.h> #include<conio.h> #include<stdlib.h> void SAVINGS(); int main(){ clrscr(); SAVINGS(); getch(); return 0; } void SAVINGS(){ int W,D,B,NB; char ch; printf("Enter Account Balance: \t \n"); scanf("%d",&B); printf("\n\n"); printf("[1] Withdraw [2] Deposit\t\n"); scanf("%s",ch); if (ch=1){ printf("\n\n"); printf("Enter a negative value for withdrawal:\t\n"); scanf("%d",&W); NB=B+W; printf("\n\n"); printf("Your new account balance is: %d\t\n",NB); if(NB<0){ printf("Insufficient Fund!\n"); } } else if(ch=2){ printf("\n\n"); printf("Enter positive value for deposit: \t\n"); scanf("%d",&D); NB=B+D; printf("\n\n"); printf("Your new account balance is: %d\t",NB); } }
==
=
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)