Home Discussion Discuss: Determining the largest number

  • same questionshruti June 26, 2011 at 4:58 PM

    this is a long method how can we apply the tertiary(?:) operator on this ........

  • missing codeRishi November 17, 2011 at 12:25 PM

    hi, while learning from your site i have found that you didn't mention what will happen if i changed the value of variable y = 700 please update your program Regards Rishi

  • computer sciencebalaji December 26, 2011 at 3:08 PM

    send me java porgramming software free dowloand in my emailid pls sendme

  • javasivaprasad January 16, 2012 at 5:50 PM

    awesome

  • javashiva February 15, 2012 at 10:27 PM

    i wana help from u to learn java

  • javaajit kumar karan February 27, 2012 at 7:53 PM

    this side is very helpfull for me and it is the best side for question answer

  • Logic changeimperfect April 3, 2012 at 10:38 AM

    int x=50, y=70, z=90; The program is not working. We can use this logic if(x > y){ if(x > z){ System.out.println("X is highest"); } else { System.out.println("Z is highest"); } } else{ if(y > c){ System.out.println("Y is highest"); } else { System.out.println("C is highest"); } }

  • coding confusionSantosh Shetty May 14, 2012 at 6:41 PM

    int x=500, y=3000, z=4000; i tried this value and did not get the answer. i think the coding needs a change. ******************** class largernumber{ public static void main(String[] args) { int x=1000, y=200, z=3000; if (x>y){ if (x>z){ System.out.println("x is greater"); } else{ if(z>y){ System.out.println("z is greater"); } } } else{ if (y>z){ System.out.println("y is greater"); } else{ System.out.println("Z is greater"); } } } } *********** I m new to java programming and please bear with me and assist me incase i m wrong.

  • JavaOmi October 1, 2012 at 11:43 PM

    Insert X is lowest value, then Y is greater than X and Z is Greater Than Y.. Like x=100,y=500,c=3000 no output Programm is wrong :o

  • javaOmi October 1, 2012 at 11:44 PM

    // Simple Logic public class Exper { public static void main(String args[]) { int a = 10; int b = 3; int c = 7; if((a>b) && (a>c)) { System.out.println("The Greatest Number Is A = " +a); } else if((b>a) && (b>c)) { System.out.println("The Greatest Number Is B = " +b); } else if((c>a) && (c>b)) { System.out.println("The Greatest Number Is B = " +c); } } }

  • assignmentsmartie92 November 1, 2012 at 7:51 PM

    I need to enter 6 grades and print the largest of the 6. I have the 6 grades entered and stored in variables but cannot find a way to print the highest and smallest. Also I am not allowed used methods. Any help would be greatfully appreciataed. Thank you.

  • about pgmgopal July 1, 2013 at 7:46 AM

    thnx for this progm

  • doubtajuram September 3, 2013 at 10:54 AM

    we are trying this program but its showing error in this pls clear my dioubt.

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Java Beginners

The largest integer among the X number
information : a) The largest integer among the X number of integers keyed in b...The largest integer among the X number  Write an application program that prompts the user to key in a whole number X. The user is then prompted 

Java Beginners

USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE
USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE  i have some... it is: write a program that reads 10 numbers from the keyboard. find the largest number and count the occurrence of the largest number number entered from the keyboard 

Java Tips and Examples

Determining the largest number
Determining the largest number     ... the coding for determining the largest number amongst three. Here we have taken three...; conditions that can help you in finding the largest value one by one.  

Programming Tutorials

Find Second Largest Number from an Array
Find Second Largest Number from an Array This section illustrates you how to find the second largest number from an array. For this purpose, we have allowed... among them. Pulls the largest number out from the array and again check 

Java Interview Questions

how to find largest number? - Java Interview Questions
how to find largest number?  this is my java coding: import...); } } i don't know how to add code to find the largest number.. please help...++) { System.out.print("Enter a number: "); num=keyboard.nextInt 

Java Beginners

find largest value
recently input by the user. c. largest: The largest number found so far.   Java Find Largest Number import java.util.*; class FindLargest...; } } System.out.println("Largest Number is: "+max 

General

Determine Average by removing Largest and Smallest Number
Determine Average by removing Largest and Smallest Number In this section, you will learn how to remove largest and smallest number from the 10 numbers.... These numbers are then stored into an array in order to find the largest 

Java Beginners

generate random numbers and display the largest
it. Write a method to find the largest value in an array. Write a program that takes... to the screen and uses your method to find the largest value in the array, then prints...]; } } System.out.println("Maximum Number is: "+ max 

Java Interview Questions

find the largest number enter by user - Java Interview Questions
find the largest number enter by user  sorry for not stating clearly my question. i want to know how to find the largest number enter by user...(fwriter); for(int i=1; i<=5; i++) { System.out.print("Enter a number 

Java Interview Questions

find largest num enter by user using loop method - Java Interview Questions
the largest number?.. thanks again..  Hi You can implement it in loop...find largest num enter by user using loop method  hi..it's me again.. thanks for answering my question.. i wanna ask, if i wanna use loop 

Java Beginners

buzz number
buzz number  buzz number 

Development process Questions

prime number
prime number  get one number and check the number prime or not using if statement   Java Check Prime Number 

PHP Questions

the number of parameters
the number of parameters  How do I find out the number of parameters passed into function 

Java Beginners

Number in array
Number in array  How to write a program to check the number that we are entered from keyboard is in the given array 

Development process Questions

prime number
prime number  check prime number using if statement   Java Check Prime Number 

Development process Questions

prime number
prime number  check prime number using if statement   Java Check Prime Number 

Java Beginners

prime number
prime number  To check a number entered by user is prime or not?   Java check prime number import java.util.*; class CheckPrimeNumber { static boolean isPrime(int number){ boolean isPrime=false 

Java Beginners

prime number
prime number  could u pls help me out in finding whether a number is a prime number or not?   import java.util.*; class CheckPrimeNumber { static boolean isPrime(int number){ boolean isPrime=false 

Java Beginners

prime number
prime number  To check a number entered by user is prime 

Java Beginners

Armstrong number
Armstrong number  I want java program for Armstrong number 

Java Interview Questions

prime number
prime number  to check wethere given number is prime or not?  ... { static boolean isPrime(int number){ boolean isPrime=false; int i=(int) Math.ceil(Math.sqrt(number)); while (i>1 

Java Beginners

prime number
prime number  HI!I want a java program that accepts a number from user and displays whether it is a prime number or not using BufferedReader 

Java Beginners

Count number of "*"
Count number of "*"  I have this code to count the number of * from a string entered. but I need to find it from an text file. Any idea? import...++; } } System.out.println("The number of vowels in the given sentence 

Java Beginners

Number Pyramid
Number Pyramid  Hi Everyone, Can someone help me write the code for the following number pyramid: print... 0 0 0 0 4 ... "); There is 5 spaces in between each number 

Java Beginners

number sorting
number sorting  program to sort a list of numbers in descending order where the inputs are entered from keyboard in runtime   Hi Friend, Try the following code: import java.util.*; class SortListInDescendingOrder 

Java Beginners

random number
random number   Please How do I generate a program that gives me random integer from 115 to 250? Using java.util.random. Thank you very much!   Hi Friend, Try the following code: import java.util.*; public final 

Java Beginners

number pyramid
number pyramid   how to get the code for the following : 1 123 12345 1234567   class Pyramid{ public static void main(String args[]){ for(int i=1;i<=7 

Java Interview Questions

Primary number
Primary number  write a program to find the 100th or nth primary number?   import java.util.*; class PrimeNumber{ public static void main(String a[]) { Scanner input=new Scanner(System.in 

Java Interview Questions

Primary number
Primary number  write a program to find the 100th or nth primary number?   import java.util.*; class PrimeNumber{ public static void main(String a[]) { Scanner input=new Scanner(System.in 

JSP Servlet Questions

random number
 

DMCA.com