Click here to Skip to main content
15,880,503 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
A three-minute telephone call to New York, costs $1.15. Each additional minutes costs $0.26. Given the total length of a call in minutes, calculate and print the cost. minutes are input and costs are output.

min / cost
1 = $1.15
2 = $1.15
3 = $1.15
4 = $1.41
5 = $1.67

each minute cost additional $0.26 after 3 minute.
i have just tried these codes to solve it but i can't continue to finish.

C++
#include <iostream>
using namespace std;

int main ()
{
 int min;
cout << " enter minute to calculate cost: ";
cin >> min;
if (min <= 3)
   cout << " cost is $1.15 " << endl; 


  return 0;
}


please write some program to finish this project. i don't mind if u don't fully understand the question because my english is not good.
Posted
Updated 21-Oct-13 14:30pm
v7
Comments
Sergey Alexandrovich Kryukov 21-Oct-13 20:13pm    
Rude. Can you guess why? :-)
—SA
danial khan 21-Oct-13 20:25pm    
this is the question from my computer programming class my teacher just gave me this question to solve but i can't find any solution from internet that's why i just post that question here.
danial khan 21-Oct-13 20:57pm    
ok thank you for your advice you are right i will try to solve it by myself and ask my teacher to give some hint. anyway thanks again.
Ranjan.D 21-Oct-13 20:57pm    
There's a hint I got for you , but you have to code :) - http://ljhs.sandi.net/faculty/volger/cs12java/Programs/ifprograms/Hint4a.html
danial khan 21-Oct-13 21:09pm    
thank you buddy i read that it was very helpful i appreciated.

1 solution

Danial Khan wrote:
this is the question from my computer programming class my teacher just gave me this question to solve but i can't find any solution from internet that's why i just post that question here.
So, it means that you don't understand why this post is utterly inappropriate.

This is such an awkward thing, to explain it, but I'll try. Your school gives you a chance to learn something, that's why they give you some assignment. You cannot learn things for real if you don't do some work with your own hands; this simple idea has been proven too many times. If somebody writes a program for you, you will loose this chance. Believe me, when you start working you will need to learn all you life, but it will be increasingly difficult to find enough time for that, so school gives you a golden opportunity. Perhaps more important that if someone does some of your work for you, it can give you undeserved benefits over your fellow students. Do you really think that someone of us is going to help you to cheat with your school to help you to give those benefits, while depriving you of the chance to learn things properly by yourself? This is so disrespectful to this community, where decent ethical standards really dominate.

And one thing looks irritating immediately: you don't even try to ask some question, simply talk to people respectfully. You simply said: "please write some program to finish this project". And even "I don't mind if u don't fully understand…" Rude, just plain rude.

If you need some help, you need to change your attitudes radically, otherwise not only you cannot get any help, but you cannot be welcome here. And, to tell you the truth, hardly anywhere else.

Uf-ff… It was very unpleasant, but I told what I had to.

Good luck,
—SA
 
Share this answer
 
v3
Comments
Ranjan.D 21-Oct-13 20:53pm    
+5 , That's it we got a solution. If his english is not good and unable to explain that's fine but if he doesn't try to complete his assignment then what else we can say ? I don't really understand why some people are not interested to learn or complete assignments.
Sergey Alexandrovich Kryukov 21-Oct-13 21:08pm    
Thank you, Ranjan.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900