PDA

View Full Version : Real/Fake Addresser [C++]



SonniE
06-01-2008, 11:52 PM
/*
------------SonniE's Real/Fake Addresser codinghs.COM Original
Author: SonniE
Created: June 1, 2008
*/
#include <iostream>
using namespace std;
int main()
{
int real, fake, result;
char type, ans;
here:
cout << "Welcome TO SonniE's Real Addresser! A WWW.codinghs.COM Original\nYou Must Enter 32Bit(8digit) Address's For Correct Reults...\n";
cout << "Which Conversion Do You Want? \n1)Fake -> Real\n2)Real -> Fake\n";
cin >> type;
if (type == '1')
{
cout<<"\nEnter Your Address: 0x";
std::cin>> hex >> fake;
fake = fake + 0x08800000;
cout << "\nYour Address in Real is: 0x0" << hex << fake <<"\n";
system("pause");
goto query;
}
else if(type == '2')
{
cout<<"\nEnter Your Address: 0x";
std::cin>> hex >> real;
real = real - 0x08800000;
cout << "Your Address in Fake is: 0x00" <<hex <<real << "\n";
system("pause");
goto query;
}
else if(type != '1' || type != '2')
{
goto inval;
}

inval:
{
system("cls");
cout <<"invalid Entry\n";
goto here;
}
query:
cout <<"Do You Want To Try Another? (y/n)";
cin >>ans;
if (ans == 'y' || ans == 'Y')
{
goto here;
}
else
{
goto there;
}
there:
cout <<"Thanks For Using SonniE's Addressing program!\n";
system("pause");
}