Write c program that will input two values from the user

Assignment Help C/C++ Programming
Reference no: EM13346785

Write C program that will input two values from the user (with a prompt !?) that are a Value and a Base with which you will evaluate and output the Value in the given Base.

The Base (B) will be anything from 1 to 16. Values could be non-negative.

Have a main() method and a sub-method (?) called DivAlg() whose prototype is 

    void DivAlg(int, int);
or
    void DivAlg(int Val, int Base);

A typical call might be DivAlg(-1, 16). The suggestion is that Value is first argument, Base is second.  

For your own survival you probably should check input for valid values (non-negative Value, Base in range). 

Demonstrate fabulosity by choosing fine reprsentative data including some error conditions. 

Recall the actual algorithm ** which simply produces digits IN REVERSE ORDER and thus, you will need to have some intermediate character buffer into which to put ascii characters corresponding to the digit values product.

Use a 'table lookup' to map numeric values to ascii characters. By this I mean that you will declare an array char TABLE[16] ={'0', '1', ... , '9', 'A', 'B' ... }; // for asciification ! You're welcome. and then you can map some digit D by simple array referece a la TABLE[D]

Code should be well documented because a human will read it. Documentation should include:

Initial Description of assignment including who, what when , how etc when due, how to use 
Use prototypes for any methods other than main. 
For any method provide documentation of input , output , and algorithm. 
Any possibly interesting segments of code should be narrated. 
For all methods, declare all variables before any executable code. Thus for (int i = ... ) ought not , and cannot be used.

Reference no: EM13346785

Questions Cloud

The theory of the businessin a thought-provoking article in : the theory of the businessin a thought-provoking article in the septemberoctober 1994 edition of the harvard business
Question security infrastructure and protocols a pki and : question security infrastructure and protocols a. pki and pgp are two methods for generating and managing public keys
Determine several resources available from the small : determine several resources available from the small business administration sba for entrepreneurs that might be useful
Question 1 let npq where pq are primes of the same length : question 1 let npq where pq are primes of the same length and let phi be eulers totient function. consider the
Write c program that will input two values from the user : write c program that will input two values from the user with a prompt ? that are a value and a base with which you
Question 1consider a government uses an expansionary fiscal : question 1consider a government uses an expansionary fiscal policy to get out of a recession. use the islm model and
The following information is available to reconcile clark : the following information is available to reconcile clark companys book balance of cash with its bank statement cash
Question if the beta of exxon mobil is 065 risk-free rate : question if the beta of exxon mobil is 0.65 risk-free rate is 4 and the market rate of return is 14 evaluate the
Describe the management process and identify the skills : describe the management process and identify the skills required to manage business organizations.explain the role of

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd