I need help writing a c program. Help please!?
-
I have to create a program under these guidelines: You are asked by a cell phone company to write a program to help calculate customers’ bill. The program will ask the user to enter how many minutes the customer has used. It will be a whole number. The bill is calculated as 25 cents for each minute up to 50 minutes, and 10 cents for each additional minute (anything over 50 minutes). There is also a tax of 10% that is added to each bill. You will output the cost for the minutes used, the tax, and the total including tax. The program will continue to ask the user to enter the minutes for the next customer, until the user enters -1. I don't even know how to start. Could someone help me get started?
-
Answer:
while(1) { printf("Enter 1 For Next Customer 0 For Exit\n"); scanf("%d", &opt); if(opt==0) break; printf("Enter time used\n"); scanf("%d", &n); total=0.25*n; if(n>=50) total +=0.1*(n-50); total *=1.1 printf("%f\n", total); } Enjoy
brockles... at Yahoo! Answers Visit the source
Related Q & A:
- I need help with a song I heard.Best solution by Yahoo! Answers
- I need help writing an objective for my resume.Best solution by resume-help.org
- I need help with a Romeo and Juliet essay.Best solution by Yahoo! Answers
- I need help choosing a camera.Best solution by Yahoo! Answers
- I need help simplifying a rational expression.Best solution by purplemath.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.