Name: ____________________________________________________ Alpha: _____________________
Describe help received: _________________________________________________________________
char next;
int count = 0, total = 0;
cin >> next;
_______________a_______________________
/ \
while((next == '0' || next == '1') && count < 8)
{ \_________/
b c
/ \
total = total*2 + next - '0';
\__________________/
d
cin >> next;
}
cout << char(total) << endl;
\_________/
e
~/$ ./fadd Enter a fraction addition problem: 15/28 + 7/32 15/28 + 7/32 = 169/224 ~/$ ./fadd Enter a fraction addition problem: 68/748 + 111/714 68/748 + 111/714 = 645/2618Turn In a printout of your code, along with a screen capture of your program running on both of the above test inputs.