TV - width =scan1.nextInt(); double...

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

View Full Document Right Arrow Icon
import java.util.Scanner; i public class TV { public static void main(String[]args) { Scanner scan = new Scanner(; int height; System.out.println("Enter the height of your standard definition TV "); height =scan.nextInt(); Scanner scan1 = new Scanner(; int width; System.out.println("Enter the width of your standard definiton TV ");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: width =scan1.nextInt(); double width2=(double)height*(1.77777); d double size= (((double)width2*(double)width2)+ ((double)height*(double)height)); double root = Math.sqrt(size); System.out.println("You equivlant HDTV size is = " +root); } }...
View Full Document

This note was uploaded on 03/01/2011 for the course CSC 116 taught by Professor Mayes during the Spring '08 term at N.C. State.

Ask a homework question - tutors are online