# find biggest number given numbers in c langua

Assembled Intel boxd945gccrl micro atx i...
May 26, 2010 at 23:09:48
Specs: xp
 how to find large given 4 nos using (nested if)

See More: find biggest number given numbers in c langua

#1
June 2, 2010 at 17:56:03
 make variables for each number. make each variable = to console input. then do something like (generically) if A>b && a>c && a>d, then write on console a + "is the largest" (and so on. replace a with the variable for next trial, like make it b>a && b>c && b>d, etc)

Report •

#2
June 3, 2010 at 04:24:18
 Or alternatively put the numbers into an array and do a bubble sort on the array.http://mathbits.com/mathbits/compsc...There is only one If/Then statement nested within a nested For Next loop.Stuart

Report •

#3
June 3, 2010 at 21:01:35
 x = firstnumif x > secondnum .x = secondnum .if x > thirdnum ..x = thirdnum ..if x > fourthnumelse .if x > thirdnum ..x = thirdnum ..if x > fourthnum ...x > fourthnum .else .if x > fourthnumx is greatest numor maybe this :)if {firstnum>secondnum and firstnum>thirdnum and firstnum>fourthnum} firstnum is greatestelse . if {secondnum>firstnum and secondnum>thirdnum and secondnum>fourthnum} secondnum is greatest .else ..if {thirdnum>firstnum and thirdnum>secondnum and thirdnum>fourthnum} thirdnum is greatest ..else fourthnum is greatestI'm learning.

Report •
Related Solutions