Well, im just in the learning process of c++
cant seam to make my loop work with 2 simpel choises :(
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
using std::boolalpha;
int main()
{
int start;
char choise;
char y;
y=1;
char n;
n=0;
cout << "whant to run dec/hex coverter y/n?";
cin >> choise;
if (choise = y)
do
{
// decimal number
int dec;
cout << "write ur decimal number here\n ";
cin >> dec;
// set output format to hex
cout.unsetf(cout.dec);
cout.setf(cout.hex);
cout << "ur hex is\n";
cout << dec << endl;
system("PAUSE");
return choise;
}
else
return 0;
}
any help with whats wrong?
1: programmer (knew that :D)
2:?