rec09 - #include <iostream> #include <string>...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <iostream> #include <string> #include <cctype> using namespace std // Precondition: caller gives character variable for letterOne and letterTwo // Postcondition: inputs letterOne and letterTwo into parameters void makeLettersUpperCase( char& letterOne, char& letterTwo) // Preconditions: // <cstring> library #included // Postconditions: // if the parameter is a lowercase letter, // the uppercase version of it is returned // otherwise whatever is passed in is returned // Precondition: max char contain maximum letter that letterOne and letterTwo can be, // min char contain minimum letter that letterOne and letterTwo can be, // counter set to 1 for number of tries // Postcondition: returns letterOne and letterTwo within specified range, // and counter increases if char variables dont fall within specified range // Precondition: caller gives variable for length of triangle // Postcondition: inputs length of triangle into parameters // Precondition: caller passes in length of triangle // Postcondition: returns length of triangle within a specified range // Precondition: passes in counter for number of tries // Postcondition: stops program if counter for number of tries is max amount of tries, which is 7 // Precondition: passes in counter for number of tries // Postcondition: displays to caller how many times it took them to input valid char variables, // only when tries is two or more // Precondition: passes in letterOne and letterTwo // Postcondition: swaps char variables if letterOne is greater than letterTwo
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

rec09 - #include &lt;iostream&gt; #include &lt;string&gt;...

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

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