subject

Import java. util. Scanner; class Main{
public static void main(String args[]){
class Parent{
private char store = "Payprice:";
private double number = 66.00 ;
public double discount = 2.00;}
Scanner userInput = new Scanner(System. in);
System. out. println("Enter your "+ store);
double price = userInput. nextInt();
while(price < number) {System. out. println("You have to pay: "+ price);}
while(price >= number) {System. out. println("You have to pay: " + price - discount);}

}
}
what is the problem with this code in java?
The platform is repl. it.
this will be 50 point.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:10, o10922025
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
image
Computers and Technology, 23.06.2019 03:00, tay9122
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
Answers: 3
image
Computers and Technology, 23.06.2019 03:00, jarteria0
State 7 common key's for every keyboard
Answers: 1
image
Computers and Technology, 23.06.2019 09:00, paulusl19
The first screen you see when you open word2016 what is called?
Answers: 1
You know the right answer?
Import java. util. Scanner; class Main{
public static void main(String args[]){
class P...

Questions in other subjects:

Konu
Social Studies, 18.12.2020 21:50
Konu
Mathematics, 18.12.2020 21:50