lab3-2 - if(num1 > num2) largest = num1; else...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// Lab3_2.java - This program calculates the largest of three integer values. public class Lab3_2 { public static void main(String args[]) { // Declare and initialize variables here. int largest; // Largest of the three values. int num1 = -10; int num2 = 330; int num3 = 331; int largestNumber; //Write assignment, if, or if else statements here as appropriate.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if(num1 > num2) largest = num1; else largest = num2; if(num2 > num3) largest = num2; else largest = num3; largestNumber = largest; // Output largest number. System.out.println("The largest value is " + largestNumber); } }...
View Full Document

Page1 / 2

lab3-2 - if(num1 > num2) largest = num1; else...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online