Question: 2) Write a Java program to accept x and y value from keyboard. Than, If x value is positive than program will use f=x+3y+5

2) Write a Java program to accept x and y value from

2) Write a Java program to accept x and y value from keyboard. Than, If x value is positive than program will use f=x+3y+5 If x value is negative than program will use f =x- y2-5 If x value is equal to 0 than program will use f=4y3+5y Function to find and print the f value on output screen. (If another number, is entered than program will give an error message like "number must be between 1 and 3")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!