answersLogoWhite

0

public class MathExtension {

public static decimal getGreatest(decimal d1, decimal d2, decimal d3) {

decimal temp = Math.Max(d1, d2);

return Math.Max(temp, d3);

}

}

caller:

Console.WriteLine(MathExtension.Extension(2m, 3m, 1m)); // prints 3 on console)

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


Can you write an algorithm to find the greatest of three number using class?

Yes. But why?


How To write a java program to create three tier applications using servlets?

barsanabegam


Write a javascript program out of three no which one s greater?

1 2 3


Write a c program to find the greatest number of from three number using switch?

Oh, well, simply: max = (a + b + c * 2 + abs(a - b) + abs(a + b - c * 2 + abs(a - b))) / 4;


Write a program in COBOL to find the largest of N number?

identification division. program-id. greatest. environment division. data division. working-storage section. 77 a pic 999. 77 b pic 999. 77 c pic 999. procedure division. greatest. display "ENTER THE THREE NUMBERS:". accept a. accept b. accept c. if a > b and a > c display a "is greatest" else if b > c display b "is greatest" else display c "is greatest". display " thank you". stop run.


What is the greatest common factor between three nine and 31?

The GCF is 1.


What is the relationship between 27 and 81?

Their greatest common factor is 27


How long does it take to get a masters in accountanting?

Typically, depending on the specific program of study and the credit load carried per semester, a masters can take between two and three years to complete.Typically, depending on the specific program of study and the credit load carried per semester, a masters can take between two and three years to complete.Typically, depending on the specific program of study and the credit load carried per semester, a masters can take between two and three years to complete.Typically, depending on the specific program of study and the credit load carried per semester, a masters can take between two and three years to complete.Typically, depending on the specific program of study and the credit load carried per semester, a masters can take between two and three years to complete.Typically, depending on the specific program of study and the credit load carried per semester, a masters can take between two and three years to complete.


Write three numbers between 0 and 1?

0.5, 0.6, 0.7


Program to print greatest of three numbers?

#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("enter the three numbers: "); scanf(%d%d%d:,&a&b&c); if(a>b | a>c) { printf("the greatest no: is %d",a); } if(b>c) { printf("the greatest no: is %d",b); } else { printf("the greatest no: is %d",c); } getch(); }


How do you write the product of five and the difference between x and three?

5(x-3)