Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Interview-Questions find largest num enter by user using loop method
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


rayda
find largest num enter by user using loop method
1 Answer(s)      5 years and 10 months ago
Posted in : Java Interview Questions



Advertisement
View Answers

February 1, 2009 at 11:14 PM


Hi

You can implement it in loop like this:

for(int i=1; i<=5; i++){
System.out.println("Enter value: ");
if(i==1){
a=in.nextInt();
} if(i==2){
b=in.nextInt();
} if(i==3){
c=in.nextInt();
} if(i==4){
d=in.nextInt();
} if(i==5) {
e=in.nextInt();
}
}


Related Tutorials/Questions & Answers:
find largest num enter by user using loop method - Java Interview Questions
find largest num enter by user using loop method  hi..it's me again...(); System.out.println("Enter five value: "); e=in.nextInt(); is it possible to find the largest number?.. thanks again..  Hi You can implement it in loop
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... IOException { int num; String filename; Scanner keyboard = new Scanner(System.in
Advertisements
find largest value
find largest value  (Assignment 1 - LargestValue)The process... recently input by the user. c. largest: The largest number found so far.   Java Find Largest Number import java.util.*; class FindLargest
how to find largest number? - Java Interview Questions
want to find the greater number which user enter on the console? Thanks...how to find largest number?  this is my java coding: import...++) { System.out.print("Enter a number: "); num=keyboard.nextInt
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 the user to enter the array elements of their choice and determine the largest
ask a user to enter 5 integer
ask a user to enter 5 integer  make a program that enter 5 numbers then identify the largest and the smallest number sample program 2 4 3 5 6 the smallest number: 2 the largest number: is 6 66
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
To find first two maximum numbers in an array,using single loop without sorting array.
To find first two maximum numbers in an array,using single loop without sorting array.  Java program to find first two maximum numbers in an array,using single loop without sorting array
To find first two maximum numbers in an array,using single loop without sorting array.
To find first two maximum numbers in an array,using single loop without sorting array.  Java program to find first two maximum numbers in an array,using single loop without sorting array
Finding a Factorial using while loop
are going to find out the factorial of 12 by using the while loop. In while loop the loop will run until the condition we have given gets true. We are using...Finding a Factorial using while loop   
Php Sql num rows
_num_rows() method.       Table:emp   Source Code... Php Sql num rows       This tutorial illustrates how to find number of rows of the table
using for loop
using for loop  what will be the source code of the program that the output will be printing all numbers that is divisible by 3 and 5 sample output: 3 is divisible by 3 5 is divisible by 5 6 is divisible by 3 9 is divisible by 3
Finding a Factorial using while loop
Finding a Factorial using while loop      In this example we are going to find out the factorial of 12 by using... find a factorial of a number by using the temp variable which will help us
using for loop in javascript
using for loop in javascript  How to use for loop in JavaScript
Find Cylinder area By inputting value from user
user and then calculate area using this radius value. Please provide me...Find Cylinder area By inputting value from user  Hello Sir I need...); double radius; System.out.print("Please enter a radius
Finding duplicates using array in for loop
Finding duplicates using array in for loop  how to find the duplicates in array using for loop
Find Month name using DateFormatSymbols class.
Find Month name using DateFormatSymbols class. In this tutorial, you will learn how to find the month name using DateFormatSymbols class. The class... entered by the user. The user is allowed to enter numbers between 1 and 12
how to find which user has modified the file
how to find which user has modified the file  how to find which user has modified the file
using variable loop
using variable loop  program to print alphabets from a-z along with ASCII codes of each alphabets in two columns using a character variable loop...can anyone help me
cannot find symbol method nextchar()??
cannot find symbol method nextchar()??  import java.util.Scanner; public class Calc5{ public static void main(String args[]){ Scanner obj = new Scanner(System.in); System.out.println("please enter
java num
java num  Write a Java program to find the number of characters in a file
PDO Fetch Num
PDO Fetch Num: We've discussed in the previous tutorial about PDO::FETCH... and the result given below, you'll find that the result of the  current.../html'); $host='localhost'; $user='root'; $password
Using while loop to loop through a cursor
Using while loop to loop through a cursor  .... Understand with Example The Tutorial grasp you an example on 'Using while loop to loop through a cursor'. The Example create a table Stu_Table
Write a program to print using for loop
Write a program to print using for loop  Write a program to print using for loop * * * *  
using switch,break and for loop
using switch,break and for loop  generate a 10 digit number and display the length of longest increasing series
Writing a loop statement using Netbean
Writing a loop statement using Netbean  Write a loop program using NetBeans.   Java Loops class Loops{ public static void main(String[] args){ int sum=0; for(int i=1;i<=10;i
Find User Home Directory
Find User Home Directory        In this example we are find user home directory. We are using System class  to get the information about system. System
Square pattern in java using for loop
Square pattern in java using for loop  please explain the logic to program the following using for loop in Java: 1 3 5 7 9 3 5 7 9 1 5 7 8 1 3 7 9 1 3 5 9 1 3 5 7
Square pattern in java using for loop
Square pattern in java using for loop  please explain the logic to program the following using for loop in Java: 1 3 5 7 9 3 5 7 9 1 5 7 8 1 3 7 9 1 3 5 9 1 3 5 7
Square pattern in java using for loop
Square pattern in java using for loop  please explain the logic to program the following using for loop in Java: 1 3 5 7 9 3 5 7 9 1 5 7 8 1 3 7 9 1 3 5 9 1 3 5 7
Square pattern in java using for loop
Square pattern in java using for loop  please explain the logic to program the following using for loop in Java: 1 3 5 7 9 3 5 7 9 1 5 7 8 1 3 7 9 1 3 5 9 1 3 5 7
Advertisements
 

 

 

DMCA.com