Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on find big no between 2 using 3 variables in cpp within the C and C++ forums, part of the Software Development category; how we calculate the big no between 2 using 3 variables such as x,y,big=0 using if statement in cpp....
|
|||||||
|
|||
|
Re: find big no between 2 using 3 variables in cpp
Hi!! finding bigger of 2 numbers in C/CPP :
Solution1 : if(x > y) { big = x; } else if(x < Y) { big = y ; } else { //Actually both are equal //we can Assign x or y to big } Solution2 : in a single statement. big = (x > y) ? x : y ; |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| QTP environmental variables | kanth | QTP | 1 | 05-23-2009 02:33 AM |
| Session Variables | C D Raghavendra | ASP.NET | 1 | 08-04-2008 02:48 AM |
| How to declare variables in SP? | bharathi_ark | SQL Server | 4 | 10-01-2007 08:38 AM |
| Environment variables in qtp | gouthami123 | QTP | 1 | 06-22-2007 03:51 AM |
| Environment Variables | nehalshah | Unix/Linux | 4 | 01-12-2007 05:13 AM |