code for hexadecimal calculator

This is a discussion on code for hexadecimal calculator within the C Programming forums, part of the General Programming Boards category; Does anybody have code for a simple hexadecimal calculator...

  1. #1
    Unregistered
    Guest

    code for hexadecimal calculator

    Does anybody have code for a simple hexadecimal calculator

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    how about you write your own??

    it's just the same as decimal... just make sure you read in as hex, and output as hex.. the rest is done just like decimal!

    use your head.
    U.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    752
    Code:
    // Adds 2 hexadecimal numbers together...
    int main (void)
    {
     int a, b, c;
     printf ("Two numbers please.\n");
     scanf ("%x%x", &a, &b);
     c = a + b;
     printf ("%X", c);
     return 0;
    }
    Callou collei we'll code the way
    Of prime numbers and pings!

  4. #4
    Unregistered
    Guest
    Thanks Question C this gives me a good start

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 03-21-2006, 06:52 AM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 03:28 AM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 4
    Last Post: 01-15-2002, 11:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21