computer science homework.

Computer Science
Tutor: None Selected Time limit: 1 Day

Write if else if statements to find the maximum of four random numbers which are stored in variables a, b, c and d. Then assign the maximum number to variable s. (Assume the variables have been declared and you do not know the value of variables.)

May 12th, 2015

s=a;
if(b>s)
  s=b;
if(c>s)
  s=c;
if(d>s)
  s=d;

May 12th, 2015

Are you studying on the go? Check out our FREE app and post questions on the fly!
Download on the
App Store
...
May 12th, 2015
...
May 12th, 2015
Dec 4th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer