What is the output from the following c code


What is the output from the following C++ code fragment if the following values are the inputs to cin? 38 35 71 14 -1 int sum, num; sum = 0; cin >> num; while(num != -1) { sum += num; cin >> num; } cout << "Sum = " << sum << endl; 5. Write a do - while loop to get 20 numbers from the user and sum them together. Output the sum after the loop. Declare any variables you need.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: What is the output from the following c code
Reference No:- TGS0571509

Expected delivery within 24 Hours