Question: Book name:Programming Fundamentals Answer the questions below concerning the following fragment of code. int n; cout < < Enter an integer: ; cin >> n;
Book name:Programming Fundamentals

Answer the questions below concerning the following fragment of code. int n; cout < < "Enter an integer: "; cin >> n; if (n < 10&&n>0) cout < < "less than 10" < < endl; else if (n > 5||n>1) cout < < "greater than 5" < < endl; else cout < < "not interesting" < < endl; a. What will be the output of the fragment above if the interactive user enters the integer value 1? b. What will be the output of the fragment above if the interactive user enters the integer value 16? What will be the output of the fragment above if the interactive user enters the integer value 8? . d. What values for n will cause the output of the fragment above to be "not interesting"?
Step by Step Solution
3.46 Rating (153 Votes )
There are 3 Steps involved in it
a The output will be less than 10 The if statement uses an AND operator So both of the comparison op... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
60d5e1d22899e_227930.pdf
180 KBs PDF File
60d5e1d22899e_227930.docx
120 KBs Word File
