Search:

Type: Posts; User: PCn3rd51

Search: Search took 0.15 seconds.

  1. Replies
    3
    Views
    883

    Re: Converting Boolean into String

    Well lets say someone enters 3,4, 5 as the sides, thats a right triangle . In the output i want it to say Side 1 is: 3..... Side 2: is 4..... Side 3: is 5....It is a right Traingle.....The area is...
  2. Replies
    3
    Views
    883

    Converting Boolean into String

    I have this project due and its asking that i print out what type of triangle it is when the user inputs 3 sides. I have most of it done and working, but it pops up different windows instead of using...
  3. [SOLVED] Re: Need help displaying the location of array index

    SOLVED! Figured it out last night but it works perfectly. I want to thank all who helped me. Feel free to test it out for yourselves \:D/



    import javax.swing.*;

    public class Homework4a {
    ...
  4. [SOLVED] Re: Need help displaying the location of array index

    Disregard my last post, wasn't thinking straight lol....



    for ( int arrayindex = 0 ; arrayindex < numarray.length ; arrayindex++ ) {

    numarray[arrayindex] != userinput;

    }
  5. [SOLVED] Re: Need help displaying the location of array index

    It seems a little redundant to nest 10 if statements to test that, is there an easier way of doing that?



    if ( userinput != numarray[1] ) {

    if userinput != numarray[2] ) {

    if...
  6. [SOLVED] Re: Need help displaying the location of array index

    well i would be one of the 10 random numbers. so how would i phrase my if statement if i want the userinput to not equal one of those 10 numbers?
  7. [SOLVED] Re: Need help displaying the location of array index

    All of you have been a big help. I fixed it so that it is now generating 10 random numbers every time the while loop starts. My only problem now is that its saying that int i needs to be initialized....
  8. [SOLVED] Re: Need help displaying the location of array index

    the code compiles and runs, but im not sure if its populating all 10 allocated spots.

    how can i test it to see if it does completely fill the array?

    If the number is negative or over 100 it...
  9. [SOLVED] Re: Need help displaying the location of array index

    yea it should populate the 10 random numbers. and keep on asking the user to guess the number, the numbers shouldn't change
  10. [SOLVED] Re: Need help displaying the location of array index

    isnt the for loop and math.random assigning random numbers to those locations? or should i just have the math.random only in the for loop?
  11. [SOLVED] Re: Need help displaying the location of array index

    "i" would be the random number that gets inserted into the 10 index locations
  12. [SOLVED] Re: Need help displaying the location of array index

    I have to create a variable that holds the index location? I didn't know that, how can i go about doing that? and where would i declare that variable?? I appreciate your help. Just keep in mind this...
  13. [SOLVED] Need help displaying the location of array index

    Hi all, just joined this forum and looking for a little advice with my code. My project was to create an array holding 10 integers and populate the array with 10 random numbers. Then ask the user to...
Results 1 to 13 of 13