he**p read file from data and add

my assignment is to read transaction and add deposit and withdrowal and provide closing statement
1224.56

420.32 -3.54 -87.56 500.00 -87.25 225.75

-72.72 -33.67 -100.10 50.50 -99.99 -19.99
my while loop keep adding the last number twice

1
2
3
4
5
while(fileFrom.good()) 
	{
		fileFrom >> currNumber;
		total += currNumber;
		cout<<total<<endl;}
Last edited on
also how
cout<<dposit;//add positive num
cout<<withdrowal;add just negative num
Topic archived. No new replies allowed.