



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!




Electrical and Computer Engineering
1 of 37
Electrical and Computer Engineering
2 of 37
cin >> length >> width; is equal to
cin >> length; cin >> width;
Electrical and Computer Engineering
3 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i=
Electrical and Computer Engineering
4 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i= cin >> i 4 60 i=
Electrical and Computer Engineering 5 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i= cin >> i >> j; 4 60 i=4, j=
Electrical and Computer Engineering 6 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i= cin >> i >> j; 4 60 i=4, j= cin >> i 25 A 16.9 i=
Electrical and Computer Engineering
7 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i= cin >> i >> j; 4 60 i=4, j= cin >> i >> ch 25 A 16.9 i=25, ch=‘A’
Electrical and Computer Engineering
8 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i= cin >> i >> j; 4 60 i=4, j= cin >> i >> ch >> x; 25 A 16.9 i=25,ch=‘A’,x=16.
Electrical and Computer Engineering
9 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i= cin >> i >> j; 4 60 i=4, j= cin >> i >> ch >> x; 25 A 16.9 i=25,ch=‘A’,x=16. cin >> i 25 A 16.9 i=
Electrical and Computer Engineering
10 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i= cin >> i >> j; 4 60 i=4, j= cin >> i >> ch >> x; 25 A 16.9 i=25,ch=‘A’,x=16. cin >> i >> ch 25 A 16.9 i=25,ch=‘A’
Electrical and Computer Engineering 11 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i= cin >> i >> j; 4 60 i=4, j= cin >> i >> ch >> x; 25 A 16.9 i=25,ch=‘A’,x=16. cin >> i >> ch >> x; 25 A 16.9 i=25,ch=‘A’,x=16.
Electrical and Computer Engineering 12 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i = 32 cin >> i >> j; 4 60 i = 4, j = 60 cin >> i >> ch >> x; 25 A 16.9 i=25,ch=‘A’,x=16. cin >> i >> ch >> x; 25 A 16.9 i=25,ch=‘A’,x=16. cin >> i 25A16.9 i=
Electrical and Computer Engineering
19 of 37
int i, j, k; char ch; float x; Statement Data Contents After Input cin >> i; 32 i = 32 cin >> i >> j; 4 60 i = 4, j = 60 cin >> i >> ch >> x; 25 A 16.9 i=25,ch=‘A’,x=16. cin >> i >> ch >> x; 25 A 16.9 i=25,ch=‘A’,x=16. cin >> i >> ch >> x; 25A16.9 i=25,ch=‘A’,x=16. cin >> i >> j >> x; 12 8 i = 12, j = 8 (Computer waits for a third number) cin >> i >> x; 46 32.4 15 i = 46, x = 32. (15 is held for later input)
Electrical and Computer Engineering
20 of 37
Electrical and Computer Engineering
21 of 37
Electrical and Computer Engineering
22 of 37
Electrical and Computer Engineering 23 of 37
Electrical and Computer Engineering 24 of 37
Electrical and Computer Engineering
25 of 37
Electrical and Computer Engineering
26 of 37
Electrical and Computer Engineering
27 of 37
Electrical and Computer Engineering
28 of 37
Electrical and Computer Engineering 29 of 37
Electrical and Computer Engineering 30 of 37
char ch1, ch2, ch3; Statements Contents Marker Position in After Input the Input Stream A B\n CD\n cin >> ch1; ch1 = ‘A’
A B\n CD\n cin >> ch1; ch1 = ‘A’
Electrical and Computer Engineering
37 of 37
Enter the part number: 4671 Enter the quantity of this part ordered: 10 Enter the unit price for this part:
Part 4671, quantity 10, at $ 27.25 each Totals $ 272.