Computers and Technology, 12.11.2019 19:31 Sidm29
Write the definition of a method printattitude, which has an int parameter and returns nothing. the method prints a message to standard output depending on the value of its parameter. if the parameter equals 1, the method prints disagree if the parameter equals 2, the method prints no opinion if the parameter equals 3, the method prints agree in the case of other values, the method does nothing. each message is printed on a line by itself.
here is what i have so far that is being marked incorrect:
public static void printattitude (int x)
{
if (x==1){
system. out. println("disagree");
}
if (x==2){
system. out. println("no opinion");
} if (x==3){
system. out. println("agree");
}
}
here is the error message that i get:
- nothing was printed to stdout
- stdout is not correct
test case table
test case x stdout feedback
#1 1 disagree
#2 2 no opinion
#3 30 - stdout is not correct
- nothing was printed to stdout
#4 9 - stdout is not correct
- nothing was printed to stdout
Answers: 3
Computers and Technology, 22.06.2019 09:00
Meenu wants to create a high quality drawing in a variety of colours. which device should she use for the same?
Answers: 1
Computers and Technology, 23.06.2019 18:30
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
Answers: 3
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
Computers and Technology, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
Write the definition of a method printattitude, which has an int parameter and returns nothing. the...
Mathematics, 17.12.2020 23:00
Mathematics, 17.12.2020 23:00
Mathematics, 17.12.2020 23:00
Health, 17.12.2020 23:00
Chemistry, 17.12.2020 23:00
Mathematics, 17.12.2020 23:00
Physics, 17.12.2020 23:00