//Nicholas Harding Bradley HW 1 Ex 2 #include <string> #include <iostream> using namespace std ; int main () int a; cout << "Please input the value for a: " ; cin >> a; int b; cout << "Please input the value for b: " ; cin >> b; cout << "The sum of a and b is: " << a + b << endl; cout << "The difference between a and b is: " << a - b << endl; cout << "The product of a and b is: " << a * b << endl; return 0 ; }
//Nicholas Harding Bradley HW 1 Ex 1 #include <string> #include <iostream> using namespace std ; int main () { string first_name = "Ivan" ; cout << "Hello, " << first_name << "!" << endl; double a = 2.4 ; double b = 3.6 ; cout << "The value of the double a is: " << a << endl; cout << "The value of the double b is: " << b << endl; return 0 ; }