BANKING SYSTEM PROGRAM

CAN YOU PLEASE HEL WITH THE FOLLOWING CODE,IT HAS TO READ AND WRITE AND ALL ITB DOES IT JUST SAY PRESS ANY KEY TO CONTINUE I DON'T WHERE THE PROBLEM IS.ITS VERY ARGENT UM SUBMITTING TOMORROW.

// FAITH WORKS.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
#include <iomanip>
using namespace std;

int main()
{
//callLog file variables
string Fname,Lname,BranchName;
int AccountNo;
double openingBal, Bal, withdrawal, deposit, interet;
char Savings = 'M';
//double AccountFee = 5000.00;

//creating infile streams
ifstream infile;

//openning the streams
infile.open("Savings.txt");

while(!infile.fail())
{

//reading varibles from files
infile>>Fname>>Lname>>AccountNo>>BranchName>>openingBal>>Bal>>withdrawal>>deposit;
if((Bal >= 1000.00)&&(Bal <= 5000.00))
{
interet = 0.3/100 * Bal;

}
else if ((Bal >= 5500.00) &&(Bal <= 15000.00))
{
interet = 0.4/100 * Bal;
}
else if (Bal >= 15500.00)
{
interet = 0.75/100 * Bal;
}
else
{
cout<< "closingBal" << Bal + interet << endl;
}
cout<<"=============================================================================="<<endl;
cout<<" CUSTOMER SAVINGS ACCOUNTS "<<endl;
cout<<""<<endl;
cout<<"First Name "<<Fname<<endl;
cout<<"Last Name "<<Lname<<endl;
cout<<"Account Number "<<AccountNo<<endl;
cout<<"Brach Name "<<BranchName<<endl;
cout<<"Openning Balance "<<openingBal<<endl;
cout<<"Balance "<<Bal<<endl;
cout<<"WithDrawal "<<withdrawal<<endl;
cout<<"Deposit = P"<<deposit<<endl;
cout<<""<<endl;
cout<<"=============================================================================="<<endl;


infile.close();
}
system("pause");
return 0;
}
This while(!infile.fail()) is why you are not seeing anything on the display. The file that you are opening, "Savings.txt" needs to be in a relative path to your execution path.
So wat is suppose to look like because its due in 2hours any help please.
Topic archived. No new replies allowed.