Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java program that gets an integer from user and prints zero if the number is zero. Otherwise, print positive or negative depending
Write a Java program that gets an integer from user and prints "zero" if the number is zero. Otherwise, print "positive" or "negative" depending on whether the number entered is positive or negative. Write a Java program to find the number of days in a month. The program must ask user the number of the month and should print the days accordingly. e.g. for month I the days printed should be 31, for month 2 it should be 28 and so on. Write a Java program that gets an angle in degrees from the user and print the sin() of that angle. e.g. if the user enters 90 as angle then the result should be 1. Hint: you need to first convert the angle into radians and then apply Math.sin(x) method
Step by Step Solution
★★★★★
3.51 Rating (148 Votes )
There are 3 Steps involved in it
Step: 1
1 Java program to input an integer and display a message based on the entered integer import javautilScanner public class Program1 public static void ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started