open_in_new
content_copy
total = 0; cin >> amount; while (amount >= 0) { total += amount; cin >> amount; }