Your variable can contain anything random if you won't assign something to it... another way (of course) would leave original declaration of variable and use do..while loop instead of while-loop.
In that case check for continuing is made after "real" do-block is executed :)
#include <iostream>
usingnamespace std;
int main()
{
int a;
char b;
int c;
char d;
do
{
cin >> a;
cin >> b;
cin >> c;
if (b == '-')
{
cout << a - c << endl;
}
if (b == '+')
{
cout << a + c << endl;
}
if (b == '*')
{
cout << a * c << endl;
}
if (b == '/')
{
cout << a * c << endl; // FIXME! (maybe you want to divide?)
}
cout << "Would you like to continue?" << endl;
cout << "y/n" << endl;
cin >> d;
} while (d=='y');
return 0;
}