Respuesta :
Answer:
Because you didn't specify what code language you want your code in, I wrote it in C++:
total=0;
cin>>amount;
while(amount<0){
total+=amount;
cin>>amount;
}
Hope this helps!
Answer:
total=0;
do{
cin >> amount;
if (amount>0)
total += amount;
}
while (amount >=0);
Explanation: