Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    24
    Rep Power
    0

    Default Need Help Can anyone explain what this means

    I have difficulty understanding this how should i layout?

    In this Task, you should design the program logic using pseudo codes:

    - Read integer data from keyboard and store the data in an array.
    - List all the even numbers and the total of even number in the array.
    - Show the total value of all the numbers in the array.
    - Show the numbers that are multiple of 3.
    - Show the toal value of every alternate numbers in the array, starting from first number, i.e. the first number + the third data + the fifth data +....
    Don Vito Corleone~I am gonna make you an offer you can't refuse

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    You are asking about pseudo code? If so,


    Java Code:
    
    Get user inputs, specified number of integers.
    
    int userInputs[number_of_integers];
    
    int numberTotal = 0;
    int evenNumberTotal = 0;
    int patternTotal = 0;
    
    while(less than iterations of number_of_integers on each)
    {
    
    // Total of all numbers of the array
    numberTotal = numberTotal + userInputs[iterationIndexOne];
    
    // Find the even number and there total
    if(userInputs[iterationIndexOne] mod 2 == 0)
    {
    display elemnt of userInputs[iterationIndexOne];
    evenNumberTotal = evenNumberTotal + userInputs[iterationIndexOne];
    }
    display total of even numbers evenNumberTotal;
    
    // Find the mutiple of 3
    if(userInputs[iterationIndexOne] mod 3 == 0)
    {
    display elemnt of userInputs[iterationIndexOne];
    }
    
    }
    
    while(less than iterations of number_of_integers by each)
    {
    patternTotal = patternTotal + userInputs[iterationIndexTwo];
    }
    may help you :)

  3. #3
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    24
    Rep Power
    0

    Default

    Hi thanks but seriously i haven't get to know what is patterntotal. I am only a beginner in java now u show me all these i hardly understand i need explanation not direct answer but u been of great help thanks dude really appreciate it but now i still need to know why and how... haiz
    Don Vito Corleone~I am gonna make you an offer you can't refuse

  4. #4
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    24
    Rep Power
    0

    Default

    What does index 1 and index 2 stands for? i still dun understand....
    Please enlighten me thanks.
    Don Vito Corleone~I am gonna make you an offer you can't refuse

  5. #5
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    24
    Rep Power
    0

    Default

    Eranga can please reply me thanks i need ur help badly
    Don Vito Corleone~I am gonna make you an offer you can't refuse

  6. #6
    CaptainMorgan's Avatar
    CaptainMorgan is offline Moderator
    Join Date
    Dec 2007
    Location
    NewEngland, US
    Posts
    835
    Rep Power
    8

    Default

    Quote Originally Posted by Clemenza1983 View Post
    Hi thanks but seriously i haven't get to know what is patterntotal. I am only a beginner in java now u show me all these i hardly understand i need explanation not direct answer but u been of great help thanks dude really appreciate it but now i still need to know why and how... haiz
    Your problem is found in just about every beginning book on Java. Where is your textbook? What does it say? Stop asking others to do your homework for you. Stop being lazy and read your textbook. Errangs assisted you- I think it's now up to you to figure it out from there. If you're still stuck- post your code and be specific about your updated issues. Otherwise - read your book.

    Eranga can please reply me thanks i need ur help badly
    You need to be more patient than that. Most of us are here purely on a voluntary basis. We don't get paid for helping you- we do it because we want to. Understand that.
    Vote for the new slogan to our beloved Java Forums! (closes on September 4, 2008)
    Want to voice your opinion on your IDE/Editor of choice? Vote now!
    Got a little Capt'n in you? (drink responsibly)

  7. #7
    Join Date
    Jan 2008
    Location
    Singapore
    Posts
    24
    Rep Power
    0

    Default

    I am sorry i understand sorry to keep asking question i am not looking for direct answer just wanna know how it works but i guess i should do my own research sorry about it.
    Don Vito Corleone~I am gonna make you an offer you can't refuse

Similar Threads

  1. Replies: 22
    Last Post: 07-25-2012, 09:51 PM
  2. Can anyone briefy explain what does that mean?
    By Clemenza1983 in forum New To Java
    Replies: 6
    Last Post: 01-29-2008, 07:05 AM
  3. May someone explain what these things means in Java
    By quickfingers in forum New To Java
    Replies: 2
    Last Post: 01-26-2008, 05:45 AM
  4. Iam new in Java Please explain to me
    By vinaytvijayan in forum AWT / Swing
    Replies: 1
    Last Post: 12-30-2007, 11:35 AM
  5. need to explain this code
    By reached in forum New To Java
    Replies: 3
    Last Post: 12-03-2007, 10:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •