1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
IgorC [24]
4 years ago
8

he cost of an international call from New York to New Delhi is calculated as follows: connection fee,$1.99; $2.00 for the first

three minutes; and $0.45 for each additional minute. Write a program thatprompts the user to input a number. The program should then output the number of minutes the calllasted and output the amount due. Format your output with two decimal places
Computers and Technology
1 answer:
Vedmedyk [2.9K]4 years ago
8 0

Answer:

// This program is written in C++ programming language

// Comments are used for explanatory purpose

// Program starts here

#include<iostream>

using namespace std;

int main ()

{

// Declare and initialize variables

float connecfee = 1.99;

float first3 = 2.00;

float addmin = 0.45; float cost;

int minutes;

// Prompt user for minutes talked

cout<<"Enter Number of Minutes: ";

cin>>minutes;

// Calculate cost;

if(minutes < 1)

{

cout<<"Enter a number greater than 0";

}

else if(minutes <= 3)

{

// Calculating cost for minutes less than or equal to 3

cost = connecfee + first3 * minutes;

cout<<"Talk time of "<<minutes<<" minutes costs "<<cost;

}

else

{

cost = connecfee + first3 * 3 + addmin * (minutes - 3);

cout<<"Talk time of "<<minutes<<" minutes costs "<<cost;

}

return 0;

}

// End of Program

You might be interested in
Sql statements that define the objects such as tables, indexes, triggers, etc. in a database are referred to as _______________
tatuchka [14]
Source statements i hope this helped

3 0
3 years ago
Jackson builders is constructing new homes in the Parkway subdivision.The company needs the logic for an application that ncalls
lord [1]
<span>The calculatePrice() method can be written in C. It will use and return doubles (which allows for decimals). It will calculate the house price of $100K + $20K per bedroom and $30K per bathroom. Next it will take that price and append the sales percentage and return that value.
double calculatePrice(decimal numBedrooms, decimal numBathrooms, decimal salesPercentage)
{
decimal housePrice = 100000 + (20000 * numBedrooms) + (30000 * numBathrooms);
return housePrice + (housePrice * salesPercentage);
}</span>
8 0
4 years ago
In order to make schemas that will appear in the Schema Library available in the XML Options dialog box, what file extension sho
Luba_88 [7]

Answer:

You can use your XML parser

Explanation:

hope this helps!

5 0
3 years ago
I have no idea how to use the sep and end in Python can someone help me I have a test tomorrow
Nuetrik [128]

Answer:

The end parameter basically prints after all the output objects present in one output statement have been returned. the sep parameter differentiates between the objects.

Explanation:

Hope this helps

https://www.edureka.co/community/53505/difference-between-end-and-sep#:~:text=end%20and%20sep%20are%20optional,parameter%20differentiates%20between%20the%20objects.

4 0
3 years ago
A restaurant recorded the ages of customers on two separate days. You are going to write a program to find the minimum age of a
Liono4ka [1.6K]

According to your code, you are setting the first element of the customerAges list as your baseline age. You then use a for loop to check each item in the list to see if it is less than your minimum variable. Then you assign the item to the minimum.

The missing line of code is b, if minimum > item:

I hope this helps!

7 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is least likely checked by the comprehensive component monitor?
    7·1 answer
  • Ron travels extensively. He posts articles, photos, and videos about his experiences on a website. Which type of electronic comm
    9·1 answer
  • What is the meaning of heart symbol in facebook?
    14·1 answer
  • Which game would be classified as an advergame? A. Tomb Raider B. Fifa Soccer C. Prince of Persia D. Flower
    9·1 answer
  • Consider the following code: x = 9 y = -2 z = 2 print (x + y * z) What is output? 9 13 14 5
    5·1 answer
  • MAN speeds are faster than WAN speeds because of ________. technological limitations regulatory limitations
    6·1 answer
  • Which results are expected in a personality test but not a skills assessment?
    13·1 answer
  • Hurry i need help What would provide structured content that would indicate what the code is describing ?
    12·1 answer
  • Some people worry that there won’t be enough jobs in the future because computers will be able to do everything better than peop
    7·2 answers
  • Which network protocol is used to handle the reliable delivery of information?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!