can somebody limit this program up to 3 users??(c++)

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2004
Posts: 21
Reputation: ze_viru$ is an unknown quantity at this point 
Solved Threads: 0
ze_viru$'s Avatar
ze_viru$ ze_viru$ is offline Offline
Newbie Poster

can somebody limit this program up to 3 users??(c++)

 
1
  #1
May 17th, 2004
i wrote it in c++,so it just giving me the matrix.
#include<iostream>

using namespace std;

int main()
{
int account;
do
{

float startBalance, endBalance, allowed, credits, charges;

cout << "Enter account number: ";
cin >> account;

cout << "Enter beginning balance: ";
cin >> credits;

cout << "Enter total charges: ";
cin >> charges;

cout << "Enter total credits: ";
cin >> startBalance;

cout << "Credit limit?: ";
cin >> allowed;

endBalance = startBalance + charges - credits;
if (endBalance > allowed)
cout << "Credit limit exceeded";
}
while (account != -1);

cout<<"enter account number (-1 to end)"<<endl;

return 0;
}
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 141
Reputation: meabed is on a distinguished road 
Solved Threads: 3
Team Colleague
meabed's Avatar
meabed meabed is offline Offline
Junior Poster

Re: can somebody limit this program up to 3 users??(c++)

 
0
  #2
May 17th, 2004
what do you mean by 3 useres ? if you mean that you want the program take input from 3 useres in the same time ! i think that it is good to use structure by this information like
struct account
{
float startBalance, endBalance, allowed, credits, charges;
}. .... then complete
okay :cheesy:
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC