Answered # Can anyone help me or give me a hint

peter_budo 2,516 Discussion Starter Eman1 peter_budo 2,516 Katana24 3 javaAddict 900 Katana24 3 Katana24 3 Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...

0

To accept 3 number and find max among three number(using && for checking multiple experssion)

Please help me, I am a beginner in this discipline, and I hope I explain the problem

Good starting point would be provide what you did so far and take it from there...

0

Good starting point would be provide what you did so far and take it from there...

Thank you very much if you have no sites to help me, especially for Mptidin I ask you to provide assistance

0

1.You should already know something as your teacher wouldn't give you this task

2.We only give homework help to those who show effort

0

To accept 3 number and find max among three number(using && for checking multiple experssion)

Please help me, I am a beginner in this discipline, and I hope I explain the problem

Well your suppose to show some of your own work but here's the method for that problem. You will have to create the main method yourself if you want to implement it.

```
public static int findMax(int a, int b, int c)
{
if(a > b && a > c){
System.out.println(a+" is the largest number");
return a;
}else if(b > a && b > c){
System.out.println(b+" is the largest number");
return b;
}else
System.out.println(c+" is the largest number");
return c;
}
```

0

Well your suppose to show some of your own work but here's the method for that problem. You will have to create the main method yourself if you want to implement it.

`public static int findMax(int a, int b, int c) { if(a > b && a > c){ System.out.println(a+" is the largest number"); return a; }else if(b > a && b > c){ System.out.println(b+" is the largest number"); return b; }else System.out.println(c+" is the largest number"); return c; }`

Nice attempt for a good reply, although I dread to think what will happen when *Eman1* is asked to find the max or min not from a total of 3 numbers but from a list of N numbers.

Try to give answers that enable the poster to write some code in their own.

0

Nice attempt for a good reply, although I dread to think what will happen when

Eman1is asked to find the max or min not from a total of 3 numbers but from a list of N numbers.Try to give answers that enable the poster to write some code in their own.

They asked for help for an answer that accepted 3 numbers so I gave it to them. If they asked for the max or min for a list of n I would have helped :D

I'll try to give more hints next time and not the full code. Cheers mate :P

0

Nice attempt for a good reply, although I dread to think what will happen when

Eman1is asked to find the max or min not from a total of 3 numbers but from a list of N numbers.Try to give answers that enable the poster to write some code in their own.

Well I thought about a list of n and came up with something. The program asks the user how many numbers they want to enter. It uses that number as the length of the array. This is code I actually created for another program but it can be applied here. I have outlined the method below:

```
public static void smallandLarge(int[] nums)
// Determine the largest and smallest value in the array
{
int largest_num = nums[0];
// Initially assign largest number value to value of array position 0
int smallest_num = nums[0];
for(int i=1;i< nums.length;i++)
// Work through the array
{
if(largest_num < nums[i])
largest_num = nums[i];
// Assign the value to largest if number is greater than previous number
else if(smallest_num > nums[i])
smallest_num = nums[i];
}
System.out.print("\nLargest Number : "+largest_num);
System.out.print("\nSmallest Number : "+smallest_num);
}// end smallandLarge method
```

So what you think javaAddict

This question has already been answered. Start a new discussion instead.

Recommended Articles

Hello All ...

Iam Getting An Error With try to excecute the stored procedure .

I have Have Sql database , the stored procedure like so :

```
USE [MPRS]
GO
/****** Object: StoredProcedure [dbo].[Search_Licenses_By_Number] Script Date: 26-Nov-16 8:06:52 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE ...
```

Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"

Here is the sample output that I ...