Tuesday, September 16, 2014

Here is the code for assignment 5.1, to make a code that finds a side of a right triangle that is not the hypotenuse. Hypotenuse length is integer a, the length of another side is integer b.

#include "math.h"
int a=10;
int b=6;
int h;
void setup()

{ Serial.begin(9600);
  Serial.println("Dis Iz Maf");
  h=sqrt(a*a-b*b);
  Serial.print("h=");
  Serial.println(h);

}
void loop()
{
}

No comments:

Post a Comment