#include <iostream>
using namespace std;

int main() {
double a, b;

while (1) {
cout << "Enter 1st number (0 to quit): ";
cin >> a;
if (a == 0)