Question

In: Computer Science

Create pseudocode for a program for Stumpy's Cell Phone Company that accepts the number of text...

Create pseudocode for a program for Stumpy's Cell Phone Company that accepts the number of text messages for a customer for one month and displays the bill for text messages.

If the user enters a negative number the program should display an error message.

If the user enters number greater than or equal to 0 your program should call a function that given the number of text messages, returns the amount to be charged. The program will then display a message stating the amount of the monthly bill for text messages.

Stumpy's charges customers a basic rate of $5 per month for their text message service. Additional rates are as follows:

The first 60 messages per month, regardless of message length, are included in the basic bill.

An additional five cents is charged for each text message after the 60th message, up to and including 180 messages.

An additional 10 cents is charged for each text message after the 180th message.

Federal, state, and local taxes add a total of 12 percent to each bill.

Solutions

Expert Solution

#include<iostream>
using namespace std;
int main()
{
int n;
double bill=5;
cout<<"Enter the number of texts : ";
cin>>n;
  
if(n>60)
{
if(n<=180)
bill+=((n-60)*5.0)/100;
else
bill+=(120*5.0+(n-180)*10.0)/100;
}
cout<<"\nMonth-End bill before the taxes are added : "<<bill;
bill*=1.12;
cout<<"\nMonth-End bill after the taxes are added : "<<bill;
  }

Output:


Related Solutions

Design a program using a flowchart or pseudocode that accepts a person’s loyalty card number and...
Design a program using a flowchart or pseudocode that accepts a person’s loyalty card number and amount spent in the store last month. Display the data only if the customer is a high spender – a person who spent more than $1000 in the store. A program that accepts customer info continuously until a sentinel value is entered and displays a list of high spenders.
java program Create a program that creates and prints a random phone number using the following...
java program Create a program that creates and prints a random phone number using the following format: XXX-XXX-XXXX. Make sure your output include the dashes.  Do not let the first three digits contain an 8 or 9 (HINT: do not be more restrictive than that) and make sure that the second set of three digits is not greater than 773. Helpful Hint:   Think though the easiest way to construct the phone number. Each digit does do not have to be determined...
Create a program that accepts in a string of 2 or more words. The program then...
Create a program that accepts in a string of 2 or more words. The program then copies the entered string changing the alpha characters into digits representing characters with acsenders, descenders and nonascender/desender characters; uppercase characters should be treated as lower case. The characters with descenders (gjpqy) should be replaced with a 1. The characters with ascenders (dbfhklt) should be replaced with a 2. The rest of the alpha characters should be replaced with a 3. The converted string should...
A cell phone company states that the mean cell phone bill of all their customers is...
A cell phone company states that the mean cell phone bill of all their customers is less than $83. A sample of 19 customers gives a sample mean bill of $82.17 and a sample standard deviation of $2.37. At ? = 0.05 , test the company’s claim? 1). State the hypothesis and label which represents the claim: : H 0 : H a 2). Specify the level of significance  = 3). Sketch the appropriate distribution, find and label the...
-Draw a flowchart and pseudocode for a program that produces a monthly bill for a cell...
-Draw a flowchart and pseudocode for a program that produces a monthly bill for a cell phone customer. -List at least 10 separate modules that might be included. - For example, one module might calculate the charge for daytime phone minutes used. - -Make a working version of this program using Python. Need all of the above answered including the correct code for program using python
A study on cell phone use measured the number of minutes people chat on their cell...
A study on cell phone use measured the number of minutes people chat on their cell phones each day. Three age groups were measured and were found to be normally distributed. Use the data below to answer the following questions. Ages 11-21: µ = 306 mins., σ = 30 mins. Ages 21-30: µ = 189 mins., σ = 22 mins. Ages 31-40: µ = 240 mins., σ = 15 mins. a) What percent of 21-30 year-old cell users talk 150...
A study on cell phone use measured the number of minutes people chat on their cell...
A study on cell phone use measured the number of minutes people chat on their cell phones each day. Three age groups were measured and were found to be normally distributed. Use the data below to answer the following questions. Ages 11-21: µ = 306 mins., σ = 30 mins. Ages 21-30: µ = 189 mins., σ = 22 mins. Ages 31-40: µ = 240 mins., σ = 15 mins. a) What percent of 21-30 year-old cell users talk 150...
Instructions: program in C++, add pseudocode and comment throughout the program. Assignment: Create a program to...
Instructions: program in C++, add pseudocode and comment throughout the program. Assignment: Create a program to keep track of the statistics for a kid’s soccer team. The program will have a structure that defines what data the program will collect for each of the players. The structure will keep the following data: Players Name (string) Players Jersey Number (integer) Points scored by Player (integer) The program will have an array of 12 players (use less for testing and development, use...
Using pseudocode design a number guessing game program. The program should generate a random number and...
Using pseudocode design a number guessing game program. The program should generate a random number and then ask the user to guess the number. Each time the user enters his or her guess, the program should indicate it was too high or too low. The game is over when the user correctly guesses the number. When the game ends, the program should display the number of guesses that the user made.
Create a program that creates and prints a random phone number using the following format: XXX-XXX-XXXX....
Create a program that creates and prints a random phone number using the following format: XXX-XXX-XXXX. Make sure your output include the dashes. Do not let the first three digits contain an 8 or 9 (HINT: do not be more restrictive than that) and make sure that the second set of three digits is not greater than 773. Helpful Hint: Think though the easiest way to construct the phone number. Each digit does do not have to be determined separately....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT