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
olga_2 [115]
3 years ago
11

cellPhoneBill(m,tx)Write the function cellPhoneBill()that takes two int m and txas input and returns a float.The function takes

total number of minutes and text messages that user spends in a particular month and returns the bill amount. These is the policy of the carrier company:
Computers and Technology
1 answer:
lidiya [134]3 years ago
4 0

Answer:

The solution code is written in C++

  1. float cellPhone(int m, int tx){
  2.    float COST_PER_MIN = 0.1;
  3.    float COST_PER_MESSAGE = 0.2;
  4.    
  5.    float bill_amount = m * COST_PER_MIN + tx * COST_PER_MESSAGE;
  6.    
  7.    return bill_amount;
  8. }

Explanation:

Firstly, declare a function named cellPhone() that takes two input parameters, m and tx (Line 1).

Since the policy of the carrier company is not given in the question, I make a presumption that the cost per minutes is $0.10 and the cost per message is $0.20 (Line 2- 3).

Next, apply the formula m * COST_PER_MIN + tx * COST_PER_MESSAGE to calculate the total bill (Line 5) and return the bill_amount as function output (Line 7).

You might be interested in
Using functions,
ZanzabumX [31]

Answer:

See explaination

Explanation:

#include <iostream>

using namespace std;

int main()

{

double h, w;

int s, a, b;

cout<<"height in feet: ";

cin>>h;

cout<<"width in feet: " ;

cin>>w;

cout<<"tile size in inches:";

cin>>s;

int height = h*12;

if(height%s==0)

a = height/s;

else

a = height/s + 1;

int width = w*12;

if(width%s==0)

b = width/s;

else

b = width/s + 1;

cout<<"Number of tiles: "<<a*b;

}

8 0
3 years ago
Please answer<br><br>NO LINKS​
Alex_Xolod [135]

Answer:

Please find the attached file for the complete solution:

Explanation:

6 0
2 years ago
List five function key<br> list two alphabet key<br>byEmmanuel okorie​
Tanya [424]

Explanation:

Function keys:F1,F2,F3,F4

Alphabetic keys H,A

5 0
2 years ago
A ________ is a small text file passed to a web browser on a user's computer by a web server.
Aleksandr-060686 [28]
Its called a Cookie.
7 0
2 years ago
Someone help pleaseee
kati45 [8]

Answer:

the área is 187

Explanation:

because you have to multiplicated base x height

the base is 17 and the height is 11

So the answer is 187

7 0
2 years ago
Other questions:
  • The _____ function calculates the average of values in a range that match criteria you specify.
    14·1 answer
  • What determines how large the crystals in an igneous rock will be?
    15·2 answers
  • _____________ refers to know-what and know-why of technology.
    12·1 answer
  • Atieno is a musician who records music on her computer. Which devices do you think she would need the most?
    12·1 answer
  • Which tab is used to configure editing restrictions in Word 2016? Review References Security Developer
    6·2 answers
  • What is a computer attack where an attacker accesses a wireless computer network, intercepts data, uses network services, and/or
    7·1 answer
  • Does anyone know how to fix this???
    11·1 answer
  • How do you make a ringtone on earsketch
    9·1 answer
  • Apply the Fill - Teal, Accent 4, Soft Bevel text effect (the 5th
    12·1 answer
  • What are the different types of monitors?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!