Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 156
  • Last Modified:

I need some help starting this program

I need help writing a program using these values
Total Length of call
10
3
2
20
1
5
Assume that anything less than 3 minutes is an automatic flat charge of $1.00

I have to use a text file for my output data.

Print the Headings on my Output.

I need some help on getting started, please someone help. I sure would appreciate.

A three minute call to SCIO NY costs $1.15. Each Additional minute costs $0.26. Given the Total Length of a call in minutes. Print the cost. I'm very confused of how to get started on this program.
0
Hpool_12
Asked:
Hpool_12
1 Solution
 
simonetCommented:
Given X as the number of minutes (the length of the call), and Y as the result in US$ (the price of the call), we have the following formula:

If X<3 then
  Y := 1
else
  Y := (X - 3) * 0.26 + 1.15;

Yours,

Alex
0
 
Hpool_12Author Commented:
how wouuld I write the rest of the program please help me. Yours truly Herb
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now