answersLogoWhite

0


Best Answer

import java.util.Scanner;

//A class to find the highest number of 10 user inputs

public class HighApp{

public static void main(String[]args){

Scanner scan = new Scanner(System.in);

int count = 0;

System.out.println("Enter number " + count);

int highest = scan.nextInt(); //first, assume highest

count ++;

while(count <= 10){

System.out.println("Enter number" + count);

int input = scan.nextInt();

if (input > hightest){

highest = input

}//end if statement

count++;

}//end while loop

System.out.println("The highest number entered was " + highest);

}//end main method

}//end HighApp class

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a code fragment that reads 10 integer values from the user and prints the highest value entered?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a body part that has unique prints?

Your finger pads, your hands, and your feet all have unique prints on them. If your prints are entered in the system, police can find you.


Which Hollywood movie has maximum prints in India?

Avatar has entered record books as the highest grossing movie of all time. Avatar has collected Rs 67 crore, making it the second-biggest Hollywood film ever in India after 2012. It released with only 45 prints


If you have been fingerprinted in Australia will it show up in IAFIS?

IF, your prints were entered into the system, they will be there.


A c plus plus programming that accepts an integer from the user and prints the last digit of the entered integer?

To obtain the last whole digit of a number, use the modulo (%) of the number and 10. The modulo evaluates to the remainder after division. Thus 15%10 returns 5 because 15 divided by 10 is 1 remainder 5. Therefore the last digit of any integer, n, is therefore n%10. The same trick can be used to find the last digit for any base, where n is a base 10 integer. Thus n%8 will return the last octal digit, while n%16 will return the last hexadecimal digit.


Which type of art print is the highest quality?

Art prints created with fabric are one of the highest and best qualities. They are strong and long-lasting and provide a good shading and color remains bright.


Where is the plank of wood in the vegie villain?

When you entered the corn maze, when you were following the corn and saw paw prints on both the sides, I think you took a left turn, when you were supposed to take a right. Take a right and follow the paw prints. There's the plank of wood you need!


Write a program that input a positive integer and prints a triangle using for loop?

write a program that reads in the size of the side of square and then pints a hollow square of that size out of asterisks and blanks?


Who is Thomas prints?

thomas prints invented prints


What is definition for dry wet prints?

wet prints are those in which fabri is either dyed or printed dry prints are the fancy prints like flock prints, burn out prints.


Difference between percent p and percent x in c language?

%p prints a pointer, %x prints an integer. They may be similar, but not the same. Eg.printf ("ptr=%p int=%d\n", main, (int)main);DOS: ptr=0F01:0010 int=10Windows: ptr=:0F010010 int=F010010


How can Implement JAVA code which takes 2 dimensional integer array as input and prints out heaviest island?

public static void main (String args[]) throws IOException { int abc = System.in.read(); }


Write a function that reads an integer and determines and prints how many digits in the integer are 7s?

== == // Returns number of 7s in num. int numSevens(int num) { int _num = num; int numSevens = 0; while( _num &gt; 0 ) { if( (_num % 10) == 7 ) { ++numSevens; } _num /= 10; } return numSevens; }