Simple math question?
how find largest of 3 numbers?
int dist1 = 8;
int dist2 = 5;
int dist3 = 10;
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
Post a Comment