So I guess 36 is right, thanks
Type: Posts; User: dx8292
So I guess 36 is right, thanks
I'm a little confused so if someone can confirm if I am doing that would be great.
Evaluate postfix expression:
1 2 + 4 * 5 6 * 10 / 8 * +
Me evaluating:
1) 1
2) 2 1
jps i don't know if he has gotten as far as .equals and toUpperCase methods yet, just cause it looks like a basic if/else chapter in some book
and IronRyan I forgot something in discount =...
It's at this line in test:
object1.Turn(turn1,straight1,combo1,turn2,straight2,combo2,turn3,straight3,combo3);
...
printMultiples(n); //in the main....I think
if (totalPrice >= 50)
{
System.out.println("Apply 10% discount (y/n)?");
discount = (in.nextLine());
if (discount=="n")
{
System.out.println(" ");
}
}
Your coding is a little hard to read.... I see your constructor and accessor methods, but where are you mutator methods?
this makes no sense:
public double qScore () {
return (double)...
done.................................close it plz
(1+11)/2=6
(1+5)/2=3
(4+5)/2=4.5 round to 5
I got three.
What do mean? I want to see how many comparisons it would take to find 45. The first comparison would be to 45 and the midpoint number (58)
Then the rest of the comparisons would be to each element...
The thing Binary Search I wasn't really sure was when it checks the middle number and if it's not value that was being searched for, does it start searching in reverse order if the first half needs...
Wanted to check if I was doing this correctly.
Binary Search: Find number of comparisons needed
5 11 18 40 45 58 62 75 88 95 100
A. 45 --> 3 needed
B. 96 --> 3 needed
FINALLY GOT IT.....took me half the day for something so ridiculously easy, but I GOT IT.
Just took out the average method and put the code directly into the main method and did total/count.
...
This does seem less complicated, but I think am supposed to stick with arrays. From what I have looked up ArrayList "is similar to Arrays," which means I can't use it with an array, unless I'm...
I'm not too familiar with ArrayList.
Can you use ArrayList with the Scanner and Array?
array.size() or numinput.size() //like I said, not too familiar with it
stick with scanner instead of joptionpane
for(int i=0;i<=what ever number;i++)
{
new keyboard=new Scanner(System.in);
System.out.print("Enter a number: ");
enternumber=keyboard.nextInt();
...
PROBLEM SOLVED....THANK YOU. I thought there was too much code just in case someone wanted to copy the entire thing, so I deleted it.
I had something different in mind, but just by looking it seems right. I'll play around with the code tomorrow cause I'm tired right now, too much coding today, but good practice. I'll post back...
I want to make a method involving arrays.
Both are Integer Arrays. (And are the same size, so I don't need to check if it's the same size)
Its needs see how many of the parallel positions matches...
Hi,
I'm to java programming, only taken one JAVA class and taking the 2nd one now.
I think you need to add a for loop and how many times does it need to loop, what's the purpose of the code?
Try putting the if/else statement between this:
for (int i=?; i<? ;i++)
{
}
...