answersLogoWhite

0


Best Answer

To find the largest of three numbers you must first find the largest of two numbers:

int max (int a, int b) { return a>b?a:b; // or, equivalently: if (a>b) return a; else return b;

}

Now we can use this function to find the maximum of three:

int max3 (int a, int b, int c) {

return max (max (a,b), c);

}

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find the largest of 3 numbers in computer programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Find the dimensions of the rectangle of largest area that can be inscribed in a circle of radius a in C programming?

Find the dimensions of the rectangle of largest area that can be inscribed in a circle of radius a in C programming


How to write a program that ask user to enter numbers until user enter- 0 then find the biggest of entered numbers in C programming using while or do while?

int i, largest=0;do { scanf ("Enter a number (0 to exit): %d", i); if (i>largest) largest=i; } while (i!=0); printf ("Largest number is: %d\n", largest);


How are computer software programs manufactured?

The "manufacturing" of computer software is called "programming"; also "development". A person or a company will use a special programming language to write instructions, which are then translated into computer code. For more details, check videos or other online resources about "computer programming". You can also find free introductory courses about computer programming in different places.


Where can you find a FORTRAN 77 program?

Go to your local library or computer store and find a book on Fortran programming, or try any internet search engine. Go to your local library or computer store and find a book on Fortran programming, or try any internet search engine. Go to your local library or computer store and find a book on Fortran programming, or try any internet search engine.


Find the largest palindrome made from the product of two 3-digit numbers?

906609=913*993 I found this using a relatively simple computer program that I wrote.


How do you find the maximum of a set of numbers?

The maximum of a set of numbers is the largest number in the set.


Where do you find queues?

You find queues wherever people are waiting to be served. You also find them in computer programming wherever objects are waiting to be processed.


How do you find new success?

actually i have done mca(master of computer application) in 2011. this is the course of computer application in which we have to learn about programming skill .


Find 3 consecutive numbers where the product of the smaller two numbers is 19 less than the square of the largest number.?

Find 3 consecutive numbers where the product of the smaller two numbers is 19 less than the square of the largest number.


What is the programming language you find easiest to understand?

This is largely a matter of personal opinion. You will likely get as many different answers as the number of computer programming languages that have ever existed.


Write a C plus plus program and flow chart to find the largest of the 3 numbers?

To find the largest of three numbers, first find the largest of two numbers: int max (int x, int y) { return x<y?y:x; } Now you can use this one function to find the largest of three numbers: int max (int x, int y, int z) { return max (max (x, y), z); }


Is it possible to find the largest natural number?

No, numbers go on and on forever.