answersLogoWhite

0


Best Answer

Yes. But why?

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you write an algorithm to find the greatest of three number using class?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is an algorithm to calculate the sum of the digits of a three digit number?

algorithm is a way to solve your problem


What is the greatest three digit number that is divisible by 7?

The greatest three digit number that is divisible by 7 is 994.


What is the greatest three digit number in base three?

999.


What is Three digit greatest number?

999 is the number you seek.


List down the names of any three parameters on which you analyze an algorithm?

what is algorithm and its use there and analyze an algorithm


What is the greatest three digit number?

999


The greatest three-digit even number that has no factor equal to 4?

198 is the greatest three-digit even number that has no factor equal to 4.


What is the greatest and least three digit number?

greatest is 999 and least is 100


What is the greatest three-digit balanced number?

It is 990


What is the greatest three-digit whole number?

999


Which is the greatest three digits odd number?

999


Write algorithm of a largest number and smallest number among three numbers?

public class FindLeastAndGreatest { public static void main(String[] args) { // number can't be equal with each other int a = 7; int b = 7; int c = 6; System.out.println(least(a,b,c)); System.out.println(greatest(a,b,c)); } public static int least(int a, int b, int c) { int least = 0; if(a < b && a < c) { least = a; } else if(b < a && b < c) { least = b; } else { least = c;} return least; } public static int greatest(int a, int b, int c) { int greatest = 0; if(a > b && a > c) { greatest = a; } else if(b > a && b > c) { greatest = b; } else { greatest = c;} return greatest; } }