View Single Post
  #14   Spotlight this post!  
Unread 15-04-2008, 14:33
garyk garyk is offline
Programming Mentor: 668, 972, 2643
FRC #0668 (Apes of Wrath)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Santa Clara (Silicon Valley) Calif.
Posts: 94
garyk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the rough
Re: C Programming Homework Help Needed

Quote:
Originally Posted by berkanbaba View Post
i have a question about c programming.can you help for the solution.thank you . i just use C not C++


Question:
Write a C program for a binary notation simulator for positive integer numbers. Your program will ask and get positive integer numbers from user. Program will stop asking new numbers if 0 is input. It will display the binary representation of the input number and the minimum number of digits required to represent that number as given in the sample run.
Yes, if you post such questions here, you're going to get mentored - such is the Way of First :-)

A quick websearch found a the same kind of tutorial most of us would have written: http://www.swarthmore.edu/NatSci/ech...th/NumSys.html

Stop reading (at least for these purposes) at "Hexadecimal, Octal, Bits, Bytes and Words.", and skip mention of negative numbers and fractions. The article gives a good introduction, and even has a couple of self-test questions.

I encourage you to not go to Wikipedia, their article is a good reference but a poor tutorial.
__________________

Silicon Valley Regional 2005, 2006 972
Silicon Valley Regional 2007 668 Xerox Creativity Award
Championship Event 2007 668
Portland Regional 2008 668
Silicon Valley Regional 2008 668, 972
Beta Test Team 2008 668 (with 100 & 254)
Silicon Valley Regional 2009 668 Regional Chairman's Award; 2643
Sacramento Regional 2009 668 Winning Alliance (thanks, 1717 & 2473!), 2010 Winning Alliance 3256
CalGames 2006, 2007, 2008, 2009, 2010, 2011 Field Tech
NorCal FTC Regional 2008, 2009 Inspector
Championship Event 2009
San Diego, Silicon Valley Regionals; Champ. Event 2010 668, 2643, 3256
Silicon Valley, Madera Regional 2012 2643
WRRF Programming Instructor 2006-2016
Regional Woodie Flowers Award 2014 2643 Utah Regional