#include <iostream>
int main()
{
using namespace std;
double num = 0;
double add = 0;
cout << "input the number: ";
cin >> num;
while (num!=0)
{
add += num;
cout << "input the number again: ";
cin >> num;
}
cout << "the total of these number is " << add << endl;
return 0;
}
相关分类