+ Reply to Thread
Results 1 to 2 of 2

Topic: HELP: Programming in C!

  1. #1
    lazyturbo's Avatar
    lazyturbo is offline Senior Member
    Join Date
    Sep 2003
    Posts
    347

    HELP: Programming in C!

    I need to know how to make a base-5 calculator. In other words, a program in C that can calculate using number in base-5.

    Or at least could someone teach me how to convert between bases in C.

    Please Help.

  2. #2
    kron_19792000 is offline Senior Member
    Join Date
    Oct 2004
    Location
    .
    Posts
    197
    Get the number
    1)Divide it by the base u want to convert it to
    2)Store the remainder
    3)Store the quotient in the variable you initially got
    4) Repeat the steps 1 and 2 till the conditon in Step 5 is reached
    5) Check if the quotient is less than the base in this case 5, if so store the quotient in the variable where you store the remainder as the last value.
    6)Reverse the variable where you have stored the remainder
    7) Display the reversed variable, this will be the answer.

    That is the logic, you can write the program now
    "I have one report of a frustrated geek who took his PC into the middle of a parking lot and dosed it with two gallons of gasoline. That's a bit much. Two cups would have been more than sufficient."--Kent Norman

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Topics

  1. Programming language/program?
    By Quiksilver in forum Computer Support Discussion
    Replies: 14
    Last Post: 11-19-2004, 06:26 PM
  2. Programming Languages
    By AwesomeSauce in forum Computer Support Discussion
    Replies: 11
    Last Post: 07-28-2004, 09:26 PM
  3. API/SDK Programming Information
    By DaleBarnes in forum AIM Support
    Replies: 0
    Last Post: 07-19-2004, 12:23 AM
  4. Book(s) on features of programming languages
    By Zlink123 in forum The BigBlueBall Lounge
    Replies: 6
    Last Post: 12-03-2003, 05:05 PM
  5. Hardware programming
    By ShadowSlayer469 in forum The BigBlueBall Lounge
    Replies: 8
    Last Post: 09-11-2003, 05:32 PM

Posting Permissions

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