Write a program that does the following:
Prompt the user and let them enter three integers. Determine and print out whether these three numbers could be the lengths of the sides of a right triangle. Your output should look like mine below in the sample runs (i.e. print the numbers and the message). The numbers can be entered in any order.
Recall that a right triangle must satisfy the pythagorean theorem, so that if x and y are the legs of the triangle, and z is the hypotenuse, the following algebraic formula is true:
x2 + y2 = z2(Also note that "Myers' First Law of Common Sense" says that the sides of a triangle must have positive lengths! :-)
Input three integers: -2 0 5 The numbers -2, 0, and 5 CANNOT be the sides of a right trangle.
Input three integers: 3 4 5 The numbers 3, 4, and 5 CAN be the sides of a right triangle.
Input three integers: 6 11 8 The numbers 6, 11, and 8 CANNOT be the sides of a right triangle.
This program will obtain entry of credit card information for a single month, then will print a small summary and determine whether the credit limit has been exceeded or not. Do the following:
Enter the account number: 123
Enter the credit limit for the account: 5000.00
Enter the starting balance for this month: 3465.12
Enter the total charges for this month: 1699.34
Enter the credits for this month: 500.00
** Summary for account # 123 **
Starting balance: $ 3465.12
Monthly charges: $ 1699.34
Monthly credits: <$ 500.00>
-----------
New Balance: $ 4664.46
Available credit: $ 335.54
Enter the account number: 2453
Enter the credit limit for the account: 2500.00
Enter the starting balance for this month: 2005.45
Enter the total charges for this month: 1348.32
Enter the credits for this month: 747.43
** Summary for account # 2453 **
Starting balance: $ 2005.45
Monthly charges: $ 1348.32
Monthly credits: <$ 747.43>
-----------
New Balance: $ 2606.34
Credit limit of $2500.00 exceeded by $106.34
Submit only your source code files through the web submission page. As there are two of them, this will require filling out the submission page twice. Make sure to click on "Assigment 2" both times. Submit the files:
triangle.c credit.c