+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    4,098,665.25
    Rep Power
    221

    Default Hex and Deci Converter[C++]

    Code:
    /*
      Name: Hex/Deci Converter
      Author: SonniE
      Date: 02/06/08 18:50
    */
    
    #include <iostream>
    using namespace std;
    int main()
    {
        char type, ans;
        int var;
        topp:
        cout << "welcome To SonniE's Data Converter\n";
        cout << "Enter How You Would Like To Convert\n1) Hex -> Deci\n2) Deci -> Hex\n";
        cin >> type;
        if (type == '1')
        {
                 cout << "Enter The Hex Value: ";
                 cin >> hex >> var;
                 cout << "\nHex: "<< hex << var <<"\nDeci: "<<dec<<var<<"\n";
                 system("pause");
                 goto query; 
        }
        else if (type == '2')
        {
             cout << "Enter The Deci Value: ";
             cin >> dec >> var;
             cout << "\nDeci: "<< dec << var << "\nHex: "<<hex<<var<<"\n";
             system("pause");
             goto query;
        }
    query:
          cout << "\nDo You Want To Try Again? (y/n)";
          cin >> ans;
          if (ans == 'y' || ans == 'Y')
          {
                  system("cls");
                  goto topp;
          }
          else 
          {
          cout << "Thanks For Using SonniE's Converter";
          system("pause");
          }
    return 0;
    }
    Attached Files


    Get Vip: »Here«
    Donate: »Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

  2. #2
    Join Date
    May 2008
    Location
    CALI
    Posts
    141
    Points
    449,490.00
    Rep Power
    210

    Default

    cool nice sonnie
    my ip:
    76.126.190.69
    don't forget im a retard and i enjoy g4y s3x

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts