CS 1440 pre-lab activities for Lab 2

Before coming to the lab you should read through page 83 in our text, then answer in writing the following question:

What is the difference between these two program segments?

Segment 1:

double x;
cin >> x;
if(x<5)cout << "less";
if(x>5)cout << "more";

Segment 2:

double x;
cin >> x;
if(x<5)cout << "less";
else cout << "more";

Turn in your answer at the start of the lab.