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

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

View Full Document Right Arrow Icon
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; }
Background image of page 1

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

View Full DocumentRight Arrow Icon
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";
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

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

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online