Question: #include int get(void); void main() { int a, sum, i; sum = 0; for( i = 0; i < 4 ; i++) { a =

#include int get(void); void main() { int a, sum, i; sum = 0; for( i = 0; i < 4 ; i++) { a = get(); sum = sum + a; } cout << sum << endl; // What is the output } int get(void) { int answer; cin >> answer; while( answer % 2 == 0 ) { cin >> answer; } return answer; } /* The user types 4 2 3 5 8 6 10 1 12 7 9 14 */ //************************************************************************** // Write the following functions

// 1. int figure(char) will return 1 if the parameter is a letter // 2 if the parameter is a space // 3 if the parameter is a digit // 4 otherwise //

// 2. int input(int, int, int) will input data from cin until a value // that is equal to one of the three parameters is input from // cin. That value will be returned. // Write a complete program that will read in 10 characters, each character // will be either a w - for a win, or a l - for a loss. The program // will compute and report the longest winning streak // For Example: l l w w l w w w l w will output 3 // w l w l w l w l w l will output 1 // l l l l l l l l l l will output 0 // w w w w l w w w l w will output 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!