answersLogoWhite

0


Best Answer

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

int s = 0;

while (a && b && c) {

s++;

a--; b--; c--;

}

return s;

// works only for positive integers

}

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

int test = INT_MIN;

while ((a-test) && (b-test) && (c-test))

test++;

return test;

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C program to find the smallest of three integers without using any of the comparision operators?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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: . -> * [] () , ?: = == < <= > >= != + += ++ - -= -- % %= / /= << <<= >> >>= ! ~ ^ & &= && | |=


What is token List out various type of token support in java?

Tokens are the smallest unit of Program. There is Five Types of Tokens 1) Reserve Word or Keywords 2) Identifier 3) Literals 4) Operators 5) Separators


What is a token in the context of a C program?

smallest individual units of a program


Writes a c program to find the sum of all integers between 1 and n?

Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11


How can one assign a list of integers in Java?

Put statements at the start of ones code will allow one to have a list of integers in their Java program. If one does this then they will successfully have integers in their code.


Write a program in c that prompt user with following lines add two integers test an integer for odd or even and quit?

write a program in C that prompts the user with the following lines: a) Add two integers c) Compare two integers for the larger t) Test an integers for odd or even q) Quit


How do you reverse of the answer program integers in C programming?

sense question Your makes no.


What is the smallest addressable memory unit in C?

program


In java What is a smallest individual unit in a program?

token


8086 assembly program to sort a list of integers?

assembly language program for sorting an array using 8086 microprocessor.


Why lexical analyzer known as scanner?

lexical analysis involves scanning the program to be compiled and recognizing the tokens that make up the source statements .Scanners are usually designed to recognize keywords ,operators,and identifiers as well as integers,floating point numbers,character strings etc.....so they are known as scanners