1*6b22f423SJonathan Anderson /*-
2*6b22f423SJonathan Anderson * Copyright 2014 Jonathan Anderson.
3*6b22f423SJonathan Anderson * All rights reserved.
4*6b22f423SJonathan Anderson *
5*6b22f423SJonathan Anderson * Redistribution and use in source and binary forms, with or without
6*6b22f423SJonathan Anderson * modification, are permitted provided that the following conditions
7*6b22f423SJonathan Anderson * are met:
8*6b22f423SJonathan Anderson * 1. Redistributions of source code must retain the above copyright
9*6b22f423SJonathan Anderson * notice, this list of conditions and the following disclaimer.
10*6b22f423SJonathan Anderson * 2. Redistributions in binary form must reproduce the above copyright
11*6b22f423SJonathan Anderson * notice, this list of conditions and the following disclaimer in the
12*6b22f423SJonathan Anderson * documentation and/or other materials provided with the distribution.
13*6b22f423SJonathan Anderson *
14*6b22f423SJonathan Anderson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15*6b22f423SJonathan Anderson * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16*6b22f423SJonathan Anderson * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17*6b22f423SJonathan Anderson * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18*6b22f423SJonathan Anderson * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19*6b22f423SJonathan Anderson * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20*6b22f423SJonathan Anderson * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21*6b22f423SJonathan Anderson * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22*6b22f423SJonathan Anderson * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23*6b22f423SJonathan Anderson * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24*6b22f423SJonathan Anderson */
25*6b22f423SJonathan Anderson
26*6b22f423SJonathan Anderson #include "pythagoras.h"
27*6b22f423SJonathan Anderson
28*6b22f423SJonathan Anderson #include <stdio.h>
29*6b22f423SJonathan Anderson
30*6b22f423SJonathan Anderson int
main(int argc,char * argv[])31*6b22f423SJonathan Anderson main(int argc, char *argv[])
32*6b22f423SJonathan Anderson {
33*6b22f423SJonathan Anderson float hypotenuse = pythagorean_theorem(3, 4);
34*6b22f423SJonathan Anderson printf("the hypotenuse of 3 and 4 is %d\n", (int) hypotenuse);
35*6b22f423SJonathan Anderson
36*6b22f423SJonathan Anderson return 0;
37*6b22f423SJonathan Anderson }
38