Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Sample C++ Program on Banking

Sample C++ Program on Banking



|Views: 7,909|Likes:
Published by Lakshminarayanan
This can help XI and XII class students to do C++ programs related to banking using classea
This can help XI and XII class students to do C++ programs related to banking using classea

More info:

Published by: Lakshminarayanan on Aug 20, 2009
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less





SAMPLE PROGRAM FOR C++ ON BANKING#include <fstream.h>#include<iostream.h>#include<conio.h>#include<string.h>#include<process.h>#include<stdio.h>#include<dos.h>void password(void){int counter=0;char username[20];char password[15];char str[20];fstream user;fstream pass;user.open("username.dat",ios::binary|ios::in|ios::out);pass.open("password.dat",ios::binary|ios::in|ios::out);do{clrscr();cout<<"\n\n\n\n\n\t\t\t USERNAME ";cout<<"\n\n\t\t ";gets(username);user.read((char*) &str,sizeof(str));user.close();if(strcmp(str,username)==0)
{clrscr();cout<<"\n\n\n\n\n\t\t\tPASSWORD ";cout<<"\n\n\t\t ";gets(password);pass.read((char*) &str,sizeof(str));pass.close();if(strcmp(str,password)==0){ clrscr();cout<<"\n\n\n\n\t\t\tACCESS ALLOWED....";delay(1500);return;}else{cout<<"\n\n\t\t\tACCESS DENIED!!!!";delay(2500);continue;}}counter++;}while(counter<3);clrscr();cout<<"\n\n\n\n\n\n\t\t\t";char arr[35]={"CLOSING DUE TO SECURITY THREAT"};for(int i=0;i<35;i++){cout<<arr[i];delay(50);
}cout<<"....";delay(2500);exit(0);}class account{char first_name[50],last_name[50],address[100],city[50],state[50];char phone_number[25],pincode[25];int accno, acctno;float amount, deposit,rate;public:account(){amount=0.00;deposit=0.00;rate = 0.0;ifstream fin;fin.open("acctno.dat",ios::in);fin>>acctno;fin.close();}void addnewrecord();

Activity (55)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
उदय राज added this note
please need username and password
Gamindu Udayanga liked this
Seid Edris liked this
Octo Surya Agung liked this
Paul Clarke liked this
Nafees Mushtaq liked this
Sunil Nanjiani liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->