MathExercise2

MathExercise2 - values you wish. v...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public class MathExercise2 { public static void main(String[] args) { final float SCALE_FACTOR=2.7E-3F; f float speed; // Declare three int variables called / double distance=(5.0*SCALE_FACTOR); // 'speed', 'distance' and 'time'. ' float time=3.0F; // Initialize 'distance' and 'time' to any
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: values you wish. v System.out.printf("speed= %5.3F", distance/time); // Add an expression for speed = distance/time. e final float SCALE_FACTOR=2.7E-3F; // add a print statement to output the speed } }...
View Full Document

Ask a homework question - tutors are online