Question
C++ Our decimal system is a position system (place value system, https: //en.wikipedia. org / wiki / place value system) with the base 10. With
C++
Our decimal system is a position system (place value system, https: //en.wikipedia. org / wiki / place value system) with the base 10. With the digits of the decimal system but also other position systems can be represented with a base 2 ... 9. Write a function unsigned int pose (unsigned intval, unsigned int base), for any given number val returns a value that can be construed in decimal notation as the value of val in the base base system. You can assume that base is always between 2 and 9, and that val is sufficiently small not to cause number range overruns on the target system.
Please note the following rules: Your output archive should contain exactly one file named "convert.c". This file defines the function pose () and possibly other calls to be made by pose () Functions. Do not specify a main () function, do not include a makefile. You must not use loops (keywords for, while, goto). You must not use global variables. You may not use a library function.
. pose (3,2) = 11 pose (5,5) 10 . pose (19,5)=34 pose(5,6)5 pose(7,7) 10 . pose (543,9) 663 /310-1-2+1-1 12 // 510 1.5+0.1=105 //1910-3.5+4.1- 345 //510-5.1 56 // 710 = 1.7+0.1=107 54310-6-92+6-9+3.1 6639
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started