






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Exam I Review Essential C++
Exam I Review Essential C++
Exam I Review Control Structures
Exam I Review Control Structures
1 # i n c l u d e < i o s t r e a m > 2 u s i n g n am esp ace s t d ; 3 4 i n t main ( v o i d ) 5 { 6 i n t x ( 3 + 4 % 6 ) ; 7 8 i f ( x <= 4 ) { 9 c o u t << " Treat your password like your toothbrush. " << e n d l ; 10 } e l s e { 11 s w i t c h ( x ) { 12 c a s e 5 : 13 c o u t << " Don ’ t let anybody else use it , " << e n d l ; 14 b r e a k ; 15 c a s e 6 : 16 c o u t << " and get a new one " << e n d l ; 17 18 c a s e 7 : 19 c o u t << " every six months. " << e n d l ; 20 b r e a k ; 21 d e f a u l t : 22 c o u t << " -- Clifford Stoll " << e n d l ; 23 b r e a k ; 24 } 25 } 26 r e t u r n 0 ; 27 }
Exam I Review Control Structures
Exam I Review Control Structures