Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program to compare 2 numbers without using logical
operators?

Answer Posted / jj

unsigned int is_same(unsigned int a, unsigned int b)
{
return (a / b);
}

int main()
{
unsigned int a, b;
a = 40, b = 40;

if ( is_same(a,b) == 1 )?
cout << "Equal" << endl
:
cout << "Not equal" << endl;
return 0;
}

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program with dynamically allocation of variable.

1140


What is static memory allocation? Explain

1104


Explain what is the difference between functions getch() and getche()?

1056


How do we open a binary file in Read/Write mode in C?

1242


Why is a semicolon (;) put at the end of every program statement?

1076


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2442


How is a pointer variable declared?

1102


Write a program to show the change in position of a cursor using c

1072


Explain goto?

1162


Explain main function in c?

1086


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

1890


What are reserved words with a programming language?

1142


What are high level languages like C and FORTRAN also known as?

1176


How do we declare variables in c?

1070


Compare and contrast compilers from interpreters.

1121