Matt McKay Jr.

Dr. Kihlstrom

HW-

Ch. 8 – p. 419, Exercises 8, 12, 13,  Ch. 10 – p. 510-511, Exercises 7, 15

 

   8.  Write C++ equations for the time:

 

   Int hours:

 

   Int minutes:

 

   Cout: << ?Enter Hour of Day?;

 

   Cin >> hours;

 

   Cout << ?Enter minute?;

 

   Cin << minutes;

 

   12. What is the output: A=12 B=20

 

   The new value of B =  21

 

   The new value of A = 33

 

   13.

 

   Cout: <<?Enter Width?;

 

   Cin  >> width;

 

   Cout: <<?Enter height:;

 

   Cin >>height;

 

   Area = (width * height);

 

   Cout: <<the area is?;

 

   Cout: <<area;

 

 

 

 7.

 

   <identifier>::= <lettter><symbol>

 

   <letter>::= a|b|?z|A|B|?Z

 

   <symbol>::= (<letter>|<digit>|/\) <symbol>

 

   <digit>::= 0|1|2?9

 

   A                     B                     5                      

C                     8                      /\

 

   Letter              letter            digit                  

letter                digit                symbol

 

                                                      

                                                  symbol       

 

   

                                                                              

symbol

 

                                                         symbol

 

                                   symbol

 

              identifier

 

   15. the store was too large

 

   The shirt was too large

 

   Shirt was too large (used to be large)

 

   The store was too large (used to be)

 

   The shirt is new