Question
Create two integers var1 = 200, var2= 35. Display the integers. calculate the value var1/var2 and display the result (see example on page 23). Notice
Create two integers var1 = 200, var2= 35. Display the integers. calculate the value var1/var2 and display the result (see example on page 23). Notice what you get for answer (answer should be integer)
Create one integer var1 = 10, and one double var2= 10.0 . divide each by 4 and display the results. Notice the difference in the answers. (see example page 25)
write a program to convert 200 liters to gallons ( google the conversion factor from liters to gallons). see example page 27. Note: make all variables double type.
write a program creating two integers a=5, b= 10. Write three if statements.
if a== b print the values of a and b and the statement a and b are equal
if a> b print the values of a and b and the statement a is greater than b
if a< b print the values of a and b and the statement a is less than b
for loop- Write a program to print the numbers from 1 to 20
**implement in java do everything in one class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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