answersLogoWhite

0

// assume you want the find the largest of ints a,b,c:

int max = (a>b&&a>c?a:b>c?b:c);

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Write a c plus plus program to find the largest among three numbers using ternary operators?

R = (A > B && A > C) ? A : (B > C) ? B : C; // parentheses not necessary - for clarity only


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


What do you mean by operators and operands?

operands are the objects or variable that we create in our program. operators fuse with the operands to build a mathematical statement in the program.


What are the different Turbo C operators?

TurboC is a program, the language is C Some of the operators are: . -> * [] () , ?: = == < <= > >= != + += ++ - -= -- % %= / /= << <<= >> >>= ! ~ ^ & &= && | |=


How do you write a VBnet program to find the prime numbers between 100 to 200?

VBnet program to find the prime numbers between 100 to 200?


How a program in c that will add 2 numbers without using any operator?

Not possible. Let's not forget than in C the followings are all operators:+, -+=, -=++, --=&, *, []function-call


C program to fine the largest of 10 given number?

first sort the ten numbers in descending order and print the first number. That will be the largest no


Write a 'c' program to fine a largest of three numbers?

largest of a, b, c :a > b ? a > c ? a : c : b > c ? b : c


Q2 Write a program to print even numbers between 10 and 50?

You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.


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


What are some examples of logical operators used in programming languages?

Logical operators used in programming languages include AND, OR, and NOT. These operators are used to combine or modify conditions in conditional statements to control the flow of a program.


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