1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A Data file consists of a list of positive random integers. The numbers are separated

Discussion in 'Java' started by sanj24, Dec 10, 2009.

  1. sanj24

    sanj24 New Member

    Joined:
    Dec 10, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Q1

    A Data file consists of a list of positive random integers. The numbers are separated by space. Design pseudo code to perform the following tasks:

    (a) Print all the numbers with 10 numbers in a line.
    (b) Calculate the total value of the even numbers in the file.
    (for example: totalValue=2+12+20+36+…and so on)
    (c) Print the largest and smallest even numbers in the file.

    Q2

    Write a java program to implement your design in Q1
     
  2. ewaldhorn

    ewaldhorn New Member

    Joined:
    Feb 16, 2010
    Messages:
    36
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Developer
    Location:
    Cape Town, South Africa
    Home Page:
    Re: A Data file consists of a list of positive random integers. The numbers are separ

    Aaaah.

    A famous homework question.

    I have a simple rule on these : show me what you have done and I will help, but I will not do your homework for you :)

    Post your ideas, code and attempts and people will gladly assist you.

    Best regards
    Ewald
     

Share This Page