need help with 10% penalty for program

This is a discussion on need help with 10% penalty for program within the C++ Programming forums, part of the General Programming Boards category; #include <iostream.h> int Acct = 0; double BegBal; double totchar; double totcred; double credlim; double newcredit; int main(void) { //cout<<"ddd"; ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    need help with 10% penalty for program

    #include <iostream.h>

    int Acct = 0;
    double BegBal;
    double totchar;
    double totcred;
    double credlim;
    double newcredit;



    int main(void)

    {
    //cout<<"ddd";
    while (Acct != 1)
    {
    cout<<"Enter account number (-1 to end) $$$$$ : ";
    cin>>Acct;

    if (Acct != -1)
    {
    cout<<"Enter beginning balance u dick: ";
    cin>>BegBal;

    cout<<"Enter total charges u $$$$$$$: ";
    cin>>totchar;

    cout<<"Enter total credits u pussy: ";
    cin>>totcred;

    cout<<"enter credit limit: ";
    cin>>credlim;

    newcredit = ((BegBal + totchar) - (totcred));

    if (newcredit > credlim)
    {
    cout<<"account: "<<Acct<<endl;
    cout<<"credit limit: "<<credlim<<endl;
    cout<<"balance: "<<newcredit<<endl;
    cout<<"credit limit exceeded u dumbass."<<endl;
    }
    }
    }
    return 0;
    }


    we need to add a 30$ fee when the credit limit is exceeded and a 10% of the remaining balance that is left over

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    we need to add a 30$ fee when the credit limit is exceeded and a 10% of the remaining balance that is left over
    Then you might consider to start putting this two things in. If you have problems coding those conditions, ask a question.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Post using code tags in future, please.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to compile projects ?
    By manzoor in forum C++ Programming
    Replies: 31
    Last Post: 10-15-2008, 11:52 AM
  2. Switch Statements
    By blackgingr in forum C Programming
    Replies: 3
    Last Post: 10-07-2002, 02:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21