Question

*must be in C programming* Scenario: My friend Steve wants to buy something nice for himself....

*must be in C programming*

Scenario:

My friend Steve wants to buy something nice for himself. He doesn't know want he wants yet but he is thinking of spending $1,000 on it or more. He makes $500 a month and has a monthly living expense of $325. He also has a lot of bi-monthly subscription payments which costs him $450 every other month ($450 is the bimonthly expenses) . He wants to know when he will be able to buy want he wants and still be able to pay his bills. He can work normal hours or work overtime and earn an extra $150 a month. Other things to consider are the tax rate (which is seven percent) and the amount of money he already has.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts about the program feel free to comment.

Program

#include <stdio.h>

int main(){
int reqMoney = 1000;//savings required
int income = 500;//actual monthly income
int monthlyExp = 325;//monthly expense
int biMonthly = 450;//expense after every other month
int totalMonthlyExp = monthlyExp + (biMonthly/2);//calculating total monthly expense
int overtime = 150;// overtime rate
int overIncome = overtime + income;//monthly income including overtime
double taxRate = overIncome*0.07;//tax rate


int alreadyHas;

printf("Enter the amount you have already: $");
scanf("%d", &alreadyHas);//taking user input for amount already has

int months =0;
int temp = alreadyHas;
while(temp < reqMoney){
//calculating monthly saving and adding it ti alreadyHas
temp += overIncome - (totalMonthlyExp + taxRate);
months++;//counting months
}
printf("It will take %d months to get $1000 if he overtimes\n", months);//displaying result
}

Output

Add a comment
Know the answer?
Add Answer to:
*must be in C programming* Scenario: My friend Steve wants to buy something nice for himself....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • This is my code in C++, my code is working pretty good but there are some...

    This is my code in C++, my code is working pretty good but there are some stuff needs ti be changed I included theb below the my code: include<iostream> #include<string> #include<vector> #include<sstream> #include<algorithm> using namespace std; //Structure struct TokenFreq { //Structure variables string token; int freq=1; }; //Method matrixInit() void matrixInit(vector<vector<int> > &matrix, int numRows, int numCols) { //Declare the needed variables int index1, index2;    //Resize matrix.resize(numRows, vector<int>(numCols));    //Loop for(index1 = 0; index1 < numRows; index1++) { //Loop...

  • Human Resources Management: Please read the case and answer the questions at the end. Joe's Hamburger...

    Human Resources Management: Please read the case and answer the questions at the end. Joe's Hamburger Grill has been doing business in the same location for the past 20 years. The Grill is located in Phoenix, Arizona, and caters to college students by providing some of the world's biggest hamburgers in a fun and casual dining atmosphere. Joe looks back with fondness on the 20 years that have passed since he first opened the grill. His primary motivation for starting...

  • In the summer of 2017, Reigh Webster and her friend Ella Hill were relaxing in a...

    In the summer of 2017, Reigh Webster and her friend Ella Hill were relaxing in a local watering hole complaining about their boring monotonous jobs. Reigh told Ella that she has been saving her money and is looking for a lucrative opportunity to invest in and get out of the day-to-day grind at the office. Ella indicated she had been doing the same. An executive walked up to the table and indicated he had overheard Reigh and Ella’s conversation and...

  • Jack Adam’s mind wandered as he sat outside Bill Squire’s office awaiting his yearly performance review…...

    Jack Adam’s mind wandered as he sat outside Bill Squire’s office awaiting his yearly performance review… [Jack thinking.] Well, it’s 8:25. Five more minutes to go. Fifteen years with the company, and this new district manager, Squire, couldn’t even call and request this meeting personally. These annual performance appraisals are tough enough, and here I’ve got a bad sales record for the past 12 months. Surely he’ll be able to understand that the sales decreases were a result of the...

  • And there was a buy-sell arrangement which laid out the conditions under which either shareholder could...

    And there was a buy-sell arrangement which laid out the conditions under which either shareholder could buy out the other. Paul knew that this offer would strengthen his financial picture…but did he really want a partner?It was going to be a long night. read the case study above and answer this question what would you do if you were Paul with regards to financing, and why? ntroductloh Paul McTaggart sat at his desk. Behind him, the computer screen flickered with...

  • please answer this after reading the article What is the actual problem? What are the known...

    please answer this after reading the article What is the actual problem? What are the known facts? What decision is to be made? How the problem ought to be solved? What are the alternatives? What are your recommendations? New AI tools make BI smarter — and more useful Data science democratized: What used to take data scientists months to prepare may soon be put together in a few days by data-astute business users. By Maria Korolov, Contributing Writer, CIO |...

  • Case Study. Multi Projects Multi Projects, Inc., is a well-established consulting firm with 400 employees. It...

    Case Study. Multi Projects Multi Projects, Inc., is a well-established consulting firm with 400 employees. It has many projects going on at the same time for various clients. Multi Projects has a good reputation, and nearly 30 percent of its business is from previous clients. It targets growing companies for future business and has been successful in this area, too. Because of the growth, things have been quite hectic, with employees trying to keep up with the work, keep clients...

  • Read Blackgold case A Preview the document: CASE A: CASE A: Frankie “Between you and me,...

    Read Blackgold case A Preview the document: CASE A: CASE A: Frankie “Between you and me, Ernest, my friend, I don’t think it will work. I have known the guy for 8 years. It is his, uh, lifestyle, you know. But hey, you make the call. It is your department. Just don’t come running to me later. . . when he screws up.” Raj Krishnamurthy stated, as he stole a glance at the next table. Ernest Cua was the Head...

  • Direction: review the eassy prof it and summerize it. Add thesis with it. make changes if...

    Direction: review the eassy prof it and summerize it. Add thesis with it. make changes if posible Title The coporate puzzel When all you believe is people behind you until they turn their back on you. Times are hard when you are not to be worried about anything in life. I had a great job with a very working paid. Things were going smoothly until one day I had a call to my manager’s office saying he will like to...

  • SECTION B: CIRCLE THE CORRECT ANSWERS 7. Interest earn on another interest is called? ​ a....

    SECTION B: CIRCLE THE CORRECT ANSWERS 7. Interest earn on another interest is called? ​ a. Simple interest ​ b. Multiple interests ​ c. Compound interest ​ d. All of the above 8. The lump sum of future value of money to be received today is termed ​ a. Future value ​ b. Present value ​ c. Compound value ​ d. Simple value 9. Sarah’s boyfriend requested that they should go out to the movies, but she had a mid-semester...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT