/* Assignment 4 */
/* Program to calculate the sides of a right triangle */

#include 
main ()
{
	/* declaration */
	int m;
	int n;
	int side1;
	int side2;
	int hypotenuse;

	/* get user input */
	printf("Enter value of m > ");
	scanf("%d", &m);
	printf("Enter value of n > ");
	scanf("%d", &n);

	/* calculation */
	side1 = m*m - n*n;
	side2 = 2 * m * n;
	hypotenuse = m * m + n * n;

	/* display results */
	printf("Side 1 is %d \nSide 2 is %d \nHypotenuse is %d \n", 
side1, side2, hypotenuse);

}

    Source: geocities.com/fire_168