Puzzle 4 Answer

28/07/2008 14:19


Logic :

1. Read Three Numbers,

2. Find Out The Difference Between The First Two Numbers

3. Add Two Numbers Along With The Difference.

4. Divide The Sum By Two, This Will Gives The Bigger Number.

5. Now Find The Difference Between The Bigger Number & The Third Number.

6. Repeat The Step 3,4.

7. Print The Biggest Number.





int main()


int First_Num,Second_Num,Third_Num,Biggest;

unsigned int Difference;

printf("Enter The First Number Is :");


printf("Enter The Second Number Is :");


printf("Enter The Third Number Is :");


Difference=abs(First_Num - Second_Num);


Difference=abs(Biggest - Third_Num);

printf("The Biggest Number Is :%d", (Biggest + Third_Num + Difference) /2);

return 0;


sahaya.webnode.comĀ© 2008 All rights reserved.

Make a free websiteWebnode