Answered step by step
Verified Expert Solution
Link Copied!

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 ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions