answersLogoWhite

0


Best Answer

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

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

first u enter three numbers .

void main()

{

int a,b,c;

clrscr();

printf("Enter a:");

scanf("%d",a);

printf("Enter b:");

scanf("%d",b);

printf("Enter c:");

scanf("%d",c);

if(a>b)

{

if (a>c)

printf("the greater no is:%d",a);

}

if(b>a)

{

if (b>c)

printf("the greater no is:%d",b);

}

if(c>a)

{

if (c>b)

printf("the greater no is:%d",a);

}

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

# include<iostream.h>

# include<conio.h>

void main()

{

int a,b,c;

clrscr();

cout<<"enter the first,second,third no you like\n";

cin>>a>>b>>c;

if(a>b&&a>c)

cout<<"first no is greater i.e "<<a<<endl;

if(b>a&&b>c)

cout<<"second no is greater i.e "<<b<<endl;

else

cout<<"third no is greater i.e "<<c<<endl;

getch();

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program find greatest no between three no?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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?


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

1 2 3


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

barsanabegam


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 &gt; b and a &gt; c display a "is greatest" else if b &gt; 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


Write three numbers between 2 and 3?

2,1 2,2 2,3


Program to print greatest of three numbers?

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