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

Still curious? Ask our experts.

Chat with our AI personalities

ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
More answers

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();

}

User Avatar

Wiki User

15y ago
User Avatar

# 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();

}

User Avatar

Wiki User

14y ago
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