Answer to Question #186964 in C for elias

Question #186964

Pele needs a program to calculate his bank balance at the end of the month. Get his balance at the beginning of the month and his deposit and withdrawal amounts during the month. Bank costs are fixed at R55.66 per month. Calculate and display his balance at the end of the month.

Select the best variable name for the balance at the beginning of the month.


1
Expert's answer
2021-04-29T03:15:27-0400
#include <stdio.h>


int main()
{
    float intial_balance;    //variable to take begining money from the user
    float deposit;
    float withdraw;
    float bankcost=55.66;
    scanf("%f",&intial_balance);
    scanf("%f",&deposit);
    scanf("%f",&withdraw);
    float final_balance=intital_balance+deposit-withdraw-bankcost;
    printf("%0.2f",final_balance);   // display final balance
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS