subject

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 correcttest case tabletest 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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
Computer programming is one type of what career
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Create a string list. 2. use console.readline() to collect values of firstname, lastname, street, city, state, zip, save them to list. 3. write a simple linq statement, call method uppercasewords() to change first letter to uppercase. 4. create a foreach statment to display the information. public static string uppercasewords(string value) { char[] array = value.tochararray(); if (array.length > = 1) { if (char.islower(array[0])) { array[0] = char.toupper(array[0]); } } for (int i = 1; i < array.length; i++) { if (array[i - 1] == ' ') { if (char.islower(array[i])) { array[i] = char.toupper(array[i]); } } } return new string(array);
Answers: 3
You know the right answer?
Write the definition of a method printattitude, which has an int parameter and returns nothing. the...
Questions
question
Mathematics, 24.12.2021 01:10
Questions on the website: 13722361