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




Have Programming Question? Ask it here!
 
 
 


mahamat ali
exercise.
1 Answer(s)      3 years and 3 months ago
Posted in : Java Beginners


write a program that reads 10 numbers fin the largest number and count the occurrence of the largest number from declared array assume you assigned 4,6,3,2,5,6,6,1 and 6.


Advertisement
View Answers

May 17, 2011 at 4:32 PM


import java.util.*;
class  FindLargest{
    public static void main(String[] args){
        int max = Integer.MIN_VALUE;
        System.out.println("Enter 10 numbers:");
        Scanner input=new Scanner(System.in);
        int array[]=new int[10];
        int count=0;
        for(int i=0;i<array.length;i++){
            array[i]=input.nextInt();
            if (array[i] > max) {
                max = array[i];
               }
         }
         for(int i=0;i<array.length;i++){
             if(array[i]==max){
                 count++;
             }
         }
        System.out.println("Largest Number is "+max+" which occurs "+count+" times");
    }
}


Related Tutorials/Questions & Answers:
exercise.
exercise.  write a program that reads 10 numbers fin the largest number and count the occurrence of the largest number from declared array assume you assigned 4,6,3,2,5,6,6,1 and 6
Asking for exercise - Java Beginners
Asking for exercise  Can you send me a small exercise question -a prograsm for collections in java?  Hi Friend, Please visit the following link: http://www.roseindia.net/javacodeexamples/index.shtml Thanks
Advertisements
An exercise using (SRS) as a blue print for Abstraction and Modeling in a one page answer. Was this example correct?
An exercise using (SRS) as a blue print for Abstraction and Modeling in a one page answer. Was this example correct?  The software tool to help automate the process of producing a blueprint for problems with a television
Disadvantages Of Obesity
Lack of exercise - People are eating a lot, but not doing any or enough exercise. Every one should do exercise regularly. You should perform Yoga Exercise to control your weight. Hereditary Metabolic disorders
Led Track Lighting
; Industrial, Exercise Fitness Equipment & much more
Airbrush Tattoos
Airbrush Tattoos  **Deleted by admin **, we are a direct importer and vendor of small business equipment & home goods. Buy at wholesale prices : Aquarium Supplies, Bicycle Motor, Business & Industrial, Exercise Fitness
Implementing ArrayList's functionalities into arrays - Java Beginners
Implementing ArrayList's functionalities into arrays  Hi guys, i'm trying to solve an exercise were is asked to write a program that manages the grades of a list of students (given by the exercise) for one single exam; The list
\wrapper
\wrapper  Hands on Exercise on Wrapper Class: Write a Java code that converts integer to Integer converts Integer to String converts String to integer converts int to String converts String to Integer converts Integer
\wrapper
\wrapper  Hands on Exercise on Wrapper Class: Write a Java code that converts integer to Integer converts Integer to String converts String to integer converts int to String converts String to Integer converts Integer
\wrapper
\wrapper  Hands on Exercise on Wrapper Class: Write a Java code that converts integer to Integer converts Integer to String converts String to integer converts int to String converts String to Integer converts Integer
XML in java - XML
argument.Then modify the program resulting from the this exercise so that it will accept
USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE
USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE  i have some exercise from my lecturer and I still can't understand about ARRAY. here it is: write a program that reads 10 numbers from the keyboard. find the largest number
Java eft transaction
of this exercise, a customer may have one or more accounts but will only ever have one... number and account type. 5.1 Exercise 1 Implement the findLinkedAccounts... accounts that are linked to the customer. 5.2 Exercise 2 Implement the authorize
Weight Loss Surgery Side Effects
. The best way is regular exercise, healthy diet and regular health check ups. On the contrary, unhealthy diet, irregular timing of intake of food, no exercise... involves exercise and diet check that can keep you healthy for a long time
Inheretance and polymorphism - Java Beginners
. merry christmas and happy new year to you! Exercise 1.) A point the x-y plane.... ------------------------------------------------------------------------------ Exercise 2.) Every... in Programming Exercise 1, you must derive the class Circle from the class
jQuery to text changes with fading effect
;p>1.Exercise your brain. Brains, like bodies, need exercise to keep fit. If you don't exercise your brain, it will get flabby and useless. Exercise your brain by reading a lot.</p> <
Create Web Page with jsp
" instead of "Date.html". This one the simply exercise for your first application JSP. The HTML file we used in the previous exercise. After
Careers in Software Testing
testing awaits your arrival. The whole exercise is to ensure the quality of product... and design. It is an exercise to check the credibility of particular software
Weight Loss
and Ayurvedic medicines. With the help of Yogic exercise you should be able... And Happiness Learn how Exercise can help you in controlling obesity? Read more
ScriptingTutorials
language.      VBScript Exercise... right into exercise 1 and expose you to the process of using VBScript in your web... first script-enabled web page. In this exercise, you will create an HTML
java - UML
circle designed in programming exercise 4.some of the operations that can
java program - Java Beginners
in this exercise. Notice 2 (Only FoST): Feel free to reuse your own
EclipsePro Test
Automatically generate test cases that exercise each path. Quickly edit test
GPS in Health Improvement & Physical Training
is playing an important role in making a daily schedule of exercise... progress of health by preparing a routine of exercise and setting some kind of goals... of uses for safe exercise. Setting goals – If you are an athlete
Writing First Hello World application in JSP
;. This one the simply exercise for your first application JSP. Just modify file
hi
selections. B/modify the application in the Exercise above (a) so that if the user
need someone do it for me plz..people
. modify the application in Exercise above so that if the user makes a menu
The Ajmal Khan Park Delhi
. The park is known for hosting many rituals that relate to exercise and other..., a unique form of therapy and lung exercise that is being practiced in many
Weight loss by Ayurveda
, irregular timing of food intake and no exercise. This causes imbalance... of Obesity. Learn how Exercise can help you in controlling obesity? Read more
Java Training and Placement
Technologies and complete all the exercise in the training course. Explore
JBoss - error during deploy - Java Beginners
JBoss - error during deploy  Hello! I've followed your fantastic tutorial about JBoss but I got stucked in exercise 2. I use JBoss AS 5 (don't really know what AS means but I hope I downloaded the right thing). I try to deploy
hi , i cant make this programmer , can any one help me to make it pls - Java Beginners
hi , i cant make this programmer , can any one help me to make it pls   In this exercise we would like to build a system in java ( set of classes ) to manage and handle text files . the required software uses the predefined
java compilation - UML
designed the class to capture the properties of a point in programming exercise 3
Error Handling in Java Script
; Example: The coming exercise uses a try...catch statement. The example calls
IT Training and Placement
includes lot of programming exercise which help you in mastering the core
Social Media Marketing for Beginners
and writing answers to questions already asked. All these exercise can give
Business Uses of Social Media
new customers to its fold. The whole exercise is meant to get more and more
Social Media and Brand Management
for social media. The whole exercise is meant to lure more visitors and potential
Craps Game Java Programming Help
of this exercise assume that the thrower always replaces a lost bet
Lose Weight Surgery
Exercise can help you in controlling obesity? Read more on Weight Loss - Natural
How much water to drink a day to lose weight?
don’t overdo it. Drinking too much water can be toxic, so exercise moderation..., cut down the water intake to minimum Learn how Exercise can help you
plz help me - Java Interview Questions
plz help me  1)Rewrite the method in exercise 10 such that it use the binary search algorithm instead. the linear search algorithm is suitable for small arrays or unsorted arrays. for large arrays linear search is inefficient
PLZ Need some help on the 2nd part of this question...Someone please help !!!!
as FastFood.java B. modify the application in Exercise above so that if the user makes
Java Training - Corporate Java Training
provide them expert training and hands on exercise to really master the Core
Setting the Column Header in JTable
which appears you on the screen. Exercise this and check it out. 
Tips for Successful Outsourcing,Useful Tips of Successful Outsourcing,Tips and Techniques for Successful Outsourcing
. The outsourcer should exercise great care while engaging a vendor. This task
Communication Website Development
made the exercise of sending and receiving messages simpler. To sum it up
RMITutorials
.    Fundamentals of RMI This exercise... be sent back to the calling program. This exercise explores how RMI handles
 

 

 

DMCA.com