Write a Java program that gets an integer from user and prints zero if the number...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
1 Java program to input an integer and display a message based on the entered integer import javautilScanner public class Program1 public static void ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
You have now been asked to work with a textile startup business that your firm has just taken on as a client. The business is particularly in need of support and guidance with budgeting and how it...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
1. Write a java program that allows a user to play 5 rounds of Rock-Paper-Scissors against a computer opponent. The user will be prompted with a choice between Rock, Paper and Scissors. A random...
-
One major concern about the future is that water scarcity will grow, particularly in arid regions where precipitation levels may be reduced by climate change. Will our institutions provide for an...
-
A 0.6-cm-diameter mild steel rod at 38?C is suddenly immersed in a liquid at 93?C with hc = 110W/(m2 K). Determine the time required for the rod to warm to 88?C.GIVENA mild steel rod is suddenly...
-
From the following transactions of T Gail you are required to indicate in which journal the transaction would be entered. Transactions of T Gail Received funds from a customer who had purchased...
-
Using the data in question 4, Department Xs contribution to overhead as a percentage of sales is a. 20%. c. 12%. e. 32%. b. 30%. d. 48%. Data From Question 4 A company operates three retail...
-
Laker Company reported the following January purchases and sales data for its only product. Required The Company uses a perpetual inventory system. Determine the cost assigned to ending inventory and...
-
= 12, where Let A, B M(R) and let n 1 be an integer such that Cn C = AB - BA. Prove that n is even and C4 = 12. Hint: use Problem 2.15.
-
Knowing that P = 210 N, replace the three couples with a single equivalent couple, specifying its magnitude and the direction of its axis.
-
Maureens qualified higher education expenses are $7,000. Maureens redemption proceeds from qualified savings bonds during the taxable year of 2020 are $10,000 (principal of $8,000 and interest of...
-
Which strategy is an appropriate way for teachers to let classroom volunteers know they are appreciated? explain
-
A person puts $ 1 2 , 0 0 0 , 0 0 0 of stock into an 7 - year GRAT. The 7 5 2 0 rate is 4 % . The annual return of the stock is 1 5 % . If it is a zeroed - out GRAT, how much would be transferred to...
-
Joan is a 17-year-old refugee who arrived in Australia as an unaccompanied minor four (4) years ago. She has been granted permanent residency status. She has difficulty with written English and has...
-
What is the single most important determinant of capital structure for a company? Question 12 Select one: a. Business risk b. Financial risk c. Exchange rate risk d. Interest rate risk
-
An investment company considers to purchase of the Apartment Lakeshore project. The year 1 NOI is expected to be $2,000,000, and based on the recent economic forecast, market supply and demand and...
-
Movie MPAA Rating Gross ($) in Millions 1 PG 15 2 PG 54 3 PG 147 4 PG 73 5 PG 56 6 PG 94 7 PG-13 142 8 PG-13 144 9 PG-13 89 10 PG-13 30 11 PG-13 118 12 PG-13 149 13 R 61 14 R 79 15 R 23 16 R 81 17 R...
-
What are some of the various ways to implement an awareness program?
-
How much of each of the following prizes or awards is taxable? a. Cheline received a $50,000 gift bag at the Oscars in 2012. b. Jon received a gold watch worth $350 for 25 years of service to his...
-
Janie graduates from high school in 2012 and enrolls in college in the fall. Her parents pay $4,000 for her tuition and fees. a. Assuming Janie's parents have AGI of $170,000, what is the American...
-
On September 14, 2012, Jay purchased a passenger automobile that is used 75 percent in his accounting business. The automobile has a basis for depreciation purposes of $35,000, and Jay uses the...
-
Xenon oscillations are a phenomenon at higher levels of power where xenon-135 loss due to neutron capture is dominant. For example, in a typical large thermal environment, if Xe-135 burnup is 10...
-
Explain the plant states considered for safety analysis and the advantages of new states.
-
Explain the relative criteria that can provide relative safety in nuclear reactors.
Study smarter with the SolutionInn App