Computers and Technology

Write a program for horizon phones, a provider of cellular phone service. prompt a user for maximum monthly values for talk minutes used, text messages sent, and gigabytes of data used, and then recommend the best plan for the customer’s needs as well as the price of that plan. a customer who needs fewer than 500 minutes of talk and no text or data should accept plan a at $49 per month. a customer who needs fewer than 500 minutes of talk and any text messages should accept plan b at $55 per month. a customer who needs 500 or more minutes of talk and no data should accept either plan c for up to 100 text messages at $61 per month or plan d for 100 text messages or more at $70 per month. a customer who needs any data should accept plan e for up to 2 gigabytes at $79 or plan f for 2 gigabytes or more at $87.

says my plan e is wrong.

mine

import java. util. scanner;
public class cellphoneservice
{
public static void main (string args[])
{
scanner sc=new scanner(system. in); //key board inputting tru scanner class
system. out. println("enter the talk minutes");
int talkmin=sc. nextint();
system. out. println("enter the text mseesage");
int textmsg=sc. nextint();
system. out. println("enter the gigabyte data");
int gbdata=sc. nextint();
if(talkmin< 500 & & textmsg==0 & & gbdata==0)
system. out. println("plan a is recommended for this user at 49$ per month");
else if(talkmin< 500 & & textmsg> 0 & & gbdata==0)
{

system. out. println("plan b is recommended for te user at 55$ permonth");
}
else if(talkmin> =500 & & textmsg< 100 & & gbdata==0)
{

system. out. println("plan c is recommended for te user at 61$ permonth");
}
else if(talkmin> =500 & & textmsg> =100 & & gbdata==0)
{

system. out. println("plan d is recommended for te user at 70$ permonth");
}
else if(talkmin==0 & & textmsg==0 & & gbdata> 0 & & gbdata< 2)
{

system. out. println("plan e is recommended for te user at 79$ permonth");
}
else if(talkmin==0 & & textmsg==0 & & gbdata> 2)
{

system. out. println("plan f is recommended for te user at 87$ permonth");
}
}
}

answer
Answers: 2

Similar questions

Do you know the correct answer?
Write a program for horizon phones, a provider of cellular phone service. prompt a user for maximum...

Questions in other subjects:

Konu
English, 11.01.2021 20:10