finclude <1ostream ean nane pace std; nt main () Snt a- 10 //Line 1 SA b- 2O //Line 2 HA C - 30: //Line 3 4Rt d- 40: //Line 4 cout « "Line 5: cin - " « cin « endl, //Line 5 cout « "Line 6: Enter four integers: "1 //Line 6 cin > a » b » c » d, //Line 7 cout <« endl; //Line 8 cout « "Line 9: The numbers you entered are:" < endl, cout « "Line 10: a - " « a « ", b -" «b « ", c - - «c < ", d-"<

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter5: Working With Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 7AYK
icon
Related questions
Question
Finclude <iostream>
nt main()
- 107
//Line 1
//Line 2
EA b-20
ENU C 30;
//Line 3
nt d- 40;
cout « "Line 5: cin - " « cin « endl;
//Line 4
//Line 5
cout « "Line 6: Enter four integers: "I
//Line 6
cin » a » b >» c » d;
//Line 7
cout « endl;
//Line 8
cout « "Line 9: The numbers you entered are:"
Line 9
< endl;
/ine 10
cout « "Line 10: a - " << a « ", b -" «b « ", c
<c < ", d- " <« d « endl;
cout « "Line 11: cin - " « cin « endl;
cout « "Line 12: cin.fail () returns " « cin.fail()
//Iine 11
//ine 12
< endl/
cout « "Line 13: Now we will use cin.clear ()." « endl,
//Ane 13
cin.clear ():
//ine 14
cout « "Line 15: cin - " « cin <« endl;
//Line 15
cout « "Line 16: cin.fail() returns " « cin.fail () ,
//Line 16
return 0,
1. Execute the program using the following input values:
34K67 28
Attach the output screen of a successful execution of your program below (Hint: Use the snipping tool to take screenshots
2 Analyze the output of the program and explaln how the Input stream statements to explain how the clear and fail functions
work.
Transcribed Image Text:Finclude <iostream> nt main() - 107 //Line 1 //Line 2 EA b-20 ENU C 30; //Line 3 nt d- 40; cout « "Line 5: cin - " « cin « endl; //Line 4 //Line 5 cout « "Line 6: Enter four integers: "I //Line 6 cin » a » b >» c » d; //Line 7 cout « endl; //Line 8 cout « "Line 9: The numbers you entered are:" Line 9 < endl; /ine 10 cout « "Line 10: a - " << a « ", b -" «b « ", c <c < ", d- " <« d « endl; cout « "Line 11: cin - " « cin « endl; cout « "Line 12: cin.fail () returns " « cin.fail() //Iine 11 //ine 12 < endl/ cout « "Line 13: Now we will use cin.clear ()." « endl, //Ane 13 cin.clear (): //ine 14 cout « "Line 15: cin - " « cin <« endl; //Line 15 cout « "Line 16: cin.fail() returns " « cin.fail () , //Line 16 return 0, 1. Execute the program using the following input values: 34K67 28 Attach the output screen of a successful execution of your program below (Hint: Use the snipping tool to take screenshots 2 Analyze the output of the program and explaln how the Input stream statements to explain how the clear and fail functions work.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Concept of memory addresses in pointers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage