Homework2

# Homework2 - Ford Kirkland C Dr Khabou Homework#2 1 X = 5 y...

This preview shows pages 1–3. Sign up to view the full content.

Ford Kirkland C++ Dr. Khabou Homework #2 1. X = 5 y = 2 z = 0 2. a) 8.5 b) 48 c) 39 d) 16.7 e) 9 3. a) false b) true c) false 2. #include <iostream>; using namespace std; int main() { int a; cout << "Please enter your credit score now.\n"; cin >> a; cout << "You are eligible for a loan with an interest rate at 6%.\n"; cout << "You are eligible for a loan with an interest rate at 4.9%.\n"; else if (a > 720) cout << "You are eligible for a loan with an interest rate at 3.9%.\n"; else if (a < 600) cout << "You are not eligible for a loan.\n"; system("pause"); return 0; }

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Ford Kirkland C++ Dr. Khabou 3. #include <iostream> #include <math.h> using namespace std; int main() { float a,b,c; cout << "For classification on what type of triangle you have.\n"; cout << "Enter the values for the sides of your triangle.\n"; cin >> a >> b >> c; if ((a <= 0) || (b <= 0) || (c <= 0)) cout << "Please enter a number that is greater than zero.\n";
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 04/07/2011 for the course EEL 0565 taught by Professor Khabou during the Spring '11 term at W. Florida.

### Page1 / 6

Homework2 - Ford Kirkland C Dr Khabou Homework#2 1 X = 5 y...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online