can you help me in this program

Reply

Join Date: Mar 2007
Posts: 1
Reputation: alaaharb is an unknown quantity at this point 
Solved Threads: 0
alaaharb alaaharb is offline Offline
Newbie Poster

can you help me in this program

 
0
  #1
Mar 9th, 2007
You are to write a numerical base converter. This application will present the
user with a menu to select the originating base and a subsequent menu to select
the destination base. You will loop through these menus until the user wishes to
quit.
You are required to break the code into logical functions (eg. a function that
converts to hexadecimal, another function to convert to binary, etc.).
Notes
• The code for this assignment will be more rigorously graded than for
assignment #1.
• You will need arrays to validate the input. You may choose to use arrays
to display the output – but it is not necessary.
• The atoi() C function is very useful for this assignment. Investigate it.
• It is recommended to take the numbers in as a string, validate each
character based on the base required (e.g. 3G4 is not a valid hexadecimal
value, nor is 21 a valid binary).
• Based on what happened in assignment #1, start early and ask
questions.
• Refer to the submission standards.
Sample Output:
Please select a base to start:
1) Decimal
2) Hexidecimal
3) Binary
Selection: 3
Please enter a value: 2
That is invalid, please enter a value: 101
Please select a base to convert to:
1) Decimal
2) Hexidecimal
3) Binary
Selection: 1
Binary 101 converts to Decimal 5.
Would you like to do another conversion? Y
CST8811:
Programming II
Assignment #2
Assignment Two – Numerical
Conversions
Page 2 of 2 ©2007 Algonquin College
Shawn Unger
02-CST8811-Assignment-Two.doc
Please select a base to start:
1) Decimal
2) Hexidecimal
3) Binary
Selection: 2
Please enter a value: 2F
Please select a base to convert to:
1) Decimal
2) Hexidecimal
3) Binary
Selection: 3
Hexadecimal 2F converts to Binary 00101111.
Would you like to do another conversion? N
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 539
Reputation: thekashyap will become famous soon enough thekashyap will become famous soon enough 
Solved Threads: 50
thekashyap's Avatar
thekashyap thekashyap is offline Offline
Posting Pro

Re: can you help me in this program

 
0
  #2
Mar 9th, 2007
Sure. Here it is.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC