Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 Practice.

Similar presentations


Presentation on theme: "Chapter 2 Practice."— Presentation transcript:

1 Chapter 2 Practice

2 Convert pseudocode to Java code
Store 20 in the speed variable. Store 10 in the time variable. Multiply speed by time and store the result in the distance variable. Display the contents of the distance variable.

3 Convert pseudocode to Java code
Store in the force variable. Store 27.5 in the area variable. Divide area by force and store the result in the pressure variable. Display the contents of the pressure variable.

4 Write program Write a program that declares the following:
A String variable named name An int variable named age A double variable named salary Store your name, age and salary in these variable. The program then displays a message similar to the following: My name is Hoa, my age is 26 and I hope to earn $300 per month.


Download ppt "Chapter 2 Practice."

Similar presentations


Ads by Google