Question: Write a program that evaluates and prints the value of the following expression: Ivalue=5xx/23x/5+7 Do this for int variables X and ivalue. Next, in the
Write a program that evaluates and prints the value of the following expression: Ivalue=5xx/23x/5+7 Do this for int variables X and ivalue. Next, in the same program evaluate and print the value of the following expression: fvalue=5yy/23y/5+7 Do this for double variables y and fvalue. Declare and initialize variables x and y at the beginning of the program. Initialize x to integer value 3 and initialize y to floating point value 3.0. Start your source file with comments that describe it: 1 - CS 151 PROGRAM ASSTGNMENT 12 - Expressions - Gauthor (Your Name) - Bversion (Date) Put these lines at the top of your source file. Of course, use your actual name and the actual date. Make sure that your source file is neatly indented. Look at the book's examples of good and bad indenting. Create the program using one of the on-line Java compilers. Copy and paste the source code from. the on-line window into the submission box of Blackboard. Your program should have just one main method of not very many lines. You may wish to divide the expressions up into several pieces rather than doing it in just one statement. For w3schools.com, the class must be named Main. This is a quirk of that web site, not Java syntax
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
