• Breaking News

    A package for professionals

    C program to Calculate Credit Card Limit.

    Here is the simple C program to Calculate Credit Card Limit.


    Question:

    (3.17-C How To Program)
    (Credit Limit Calculator) Develop a C program that will determine if a department store
    customer has exceeded the credit limit on a charge account. For each customer, the following facts are available:
    a) Account number
    b) Balance at the beginning of the month
    c) Total of all items charged by this customer this month
    d) Total of all credits applied to this customer's account this month
    e) Allowed credit limit
    The program should input each fact, calculate the new balance (= beginning balance +
    charges – credits), and determine whether the new balance exceeds the customer's credit limit. For
    those customers whose credit limit is exceeded, the program should display the customer's account
    number, credit limit, new balance and the message “Credit limit exceeded.”

    Source Code:

    #include <stdio.h>
    #include <stdlib.h>
    int main()
    {
        int acc;
        float bal,cha,cred,limit;
        while (acc!=-1){
            printf("Enter account number (-1 to end):");
            scanf("%d",&acc);
            if (acc==-1)
                break;
            printf("Enter beginning balance:");
            scanf("%f",&bal);
            printf("Enter total charges:");
            scanf("%f",&cha);
            printf("Enter total credits:");
            scanf("%f",&cred);
            printf("Enter credit limit:");
            scanf("%f",&limit);
            bal+=cha-cred;
            if (bal>limit){
            printf("account:\t%d\nCredit Limit:\t%.2f\nBalance:\t%.2f",acc,limit,bal);
                printf("\nCredit Limit Exceeded.\n\n");}
        }
        return 0;
    }

    Note:

    Any Question!!??
    "Feel Free To Ask In Comments"
    Like and Share or Follow us on Facebook and Instagram for more Programs Codes ;).
    Email Us or inbox us to get Your Programs done :)

    4 comments:

    1. Develop a c program that will determine if a department store customer has exceeded
      the credit limit on a charge account. For each customer, the following facts are available:
      i. Account number
      ii. Balance of the beginning of the months
      iii. Total of all items charged by this customer this months
      iv. Total of all credits applied to this customer’s account this month
      v. Allowed credit limit
      This program should input each of these facts, calculate the new balance (=beginning balance +
      charges - credits), and determine if the new balance exceeds the customer’s limit. For those
      customers whose credit limit is exceeded, the program should display the customer’s account
      number, credit limit, new balance and the message “credit limit exceeded.”
      Enter account number (-1 to end): 100
      Enter beginning balance: 5394.78
      Enter total charges: 1000.00
      Enter total credits: 500.00
      Enter credit limit: 5500.00
      Account: 100
      Credit limit: 5500.00
      Balance: 5894.78
      Credit limit exceeded
      Enter account number (-1 to end): 200
      Enter beginning balance: 1000.00
      Enter total charges: 123.45
      Enter total credits: 321.00
      Enter credit limit: 1500.00
      Enter account number (-1 to end): 300
      Enter beginning balance: 500.00
      Enter total charges: 274.73
      Enter total credits: 100.00
      Enter credit limit: 800.00

      ReplyDelete
    2. .

      Please help me to create a program using C program.
      Credit card determination

      You have initially 100,000.00 credit limit your visa card. The you start shopping over a period of time. Make a program that takes in the initial credit limit , then start accepting amount for every purchase you make . The program deducts from your credit limit everytime you have to use your credit card, until you have reached the lowest maintaining credit limit of 500.00
      *add new limit
      *view balance
      *add purchase/edit purchase
      *exit

      ReplyDelete

    Our Aim

    About