Simple math question?


how find largest of 3 numbers?

int dist1 = 8;
int dist2 = 5;
int dist3 = 10;

code: [select]

int maxvalue = max(dist1,max(dist2,dist3));


see here: http://arduino.cc/en/reference/max


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Simple math question?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums