Question: Lab 17 Due Date: See Blackboard Source File: /2336/17/lab17. (CICPP I cpplc++lcclcxxlcp) Input Output Value: under control of main function under control of main function

 Lab 17 Due Date: See Blackboard Source File: /2336/17/lab17. (CICPP Icpplc++lcclcxxlcp) Input Output Value: under control of main function under control of

Lab 17 Due Date: See Blackboard Source File: /2336/17/lab17. (CICPP I cpplc++lcclcxxlcp) Input Output Value: under control of main function under control of main function Write a recursive function that prints the hexadecimal representation of a signed, nonzero integer. Use a digit set of 0 - 9, A - F. A sample main function for testing your function is shown in Figure 1 and commands for compiling, linking, and running this assignment are shown in Figure 2. To use the Makefile as distributed in class, add a target of lab17 to targets2srcfiles 1 #include #include s using namespace std; 7 // printHexadecimal is a recursive function that writes the hexadecimal s /I representation of num to output stream os a void printHexadecimal(int num, ostream os); 1 int main() 13int num; while (cin >> num) cout cd 2336 2 newuserQcsunix /2336>./getlab.ksh 17 s * Checking to see if a folder exists for Lab 17 . . "No 4C eating a folder for Lab 17 Checking to see if Lab 17 has sample input and output files. . .Yes Copying input and output files for Lab 17 from folder /usr/local/2336/data/17 to folder ./17 Checking to see if /usr/local/2336/src/lab17main.C exists.. .Yes Copying file /usr/local/2336/src/1ab17main . C to folder ./17 9 * Checking to see if /usr/local/2336/include/1ab17.h exists. . .No 41Copying file /usr/local/2336/src/Makefile to folder /17 12Adding a target of lab17 to targets2srcfiles 13Touching file ./17/1ab17.cpp Edit file ./17/1ab17.cpp in Notepad++ s newuser@csunix /2336> cd 17 newuser@csunix "/2336/17> ls Makefile 01.dat 18 newuser@csunix /2336/17> make lab17 19 g++ -g -Wall-std-c++11-c lab17main.c -I/usr/local/2336/include I 2 g++ -g -Wall-std-c++11 lab17.cpp -I/usr/local/2336/include I 21 g++- lab17 lab17main.o lab17.o-L/usr/local/2336/1ib -1m -lbits 22 newuser@csunix /2336/17> cat 01.dat 23 0 1 2 3341 2147483647 24 -1-2 -3341-2147483647 25 -2147483648 26 newuser@csunix "/2336/17> cat 01.dat | ./1ab17 01.out lab17.cpp b17main.c 0 base 100 base 16 1 base 101 base 16 2 base 10 2 base 16 3341 base 10 DOD base 16 31 2147483647 base 107FFFFFFF base 16 -1 base 10- FFFFFFFF base 16 -2 base 10FFFFFFFE base 16 -3341 base 10-FFFFF2F3 base 16 35 -2147483647 base 10-80000001 base 16 36 -2147483648 base 10-80000000 base 16 newuser csunix /2336/17> cat 01.dat ./lab17 my.out s newuser csunix /2336/17> diff 01.out my.out newuserocsunix "/2336/17> Figure 2. Commands to Compile, Link, & Run Lab 17

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!