Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Part 1 Coding Assignment 6 Part 1 Create CodeCxxxxxxxxxx·This program wil\' be u

ID: 3739014 • Letter: P

Question

Part 1

Coding Assignment 6 Part 1 Create CodeCxxxxxxxxxx·This program wil' be used to merdu he brary funtern that you wil erih parti ths assignment. This program will display a menu where each menu item will be one of your sbrary functions which wiR reside 1. Convert Decinal to Binary 2.Sentence cleanup 3 8kU Convertar Enter menu choice Code6 xxxxxxxxxx-c will not contain any of the code for these functions-they wil only be called and the output will be printed. Use ? w?tah statement to create the menu. Rensember to use a da fault statement in tase s mena disen s entered that is not valid. Each menu option/case statement will call the brary function and simply print the output array with printf} and %s-no for loops in the menu Part 2 Remove the code for Printsinary) from Myub.c. Eliminate PrintBinaryO trom Mylib.c and Mytib.h. Add a parameter to ConvertDecimalToBinary) to return the corwerted number in an array called OutputAcray. This function is your first item on your new menu in Code6 xoooocoocxAdd a call to ConvertDecimalToBinaryl) in Code6 xxoooooo. case 1 should call ConvertbecimalToBinaryl) and then Code6 oox.c should print the returned output that is in OutputArray Part 3

Explanation / Answer

Part 1:

#include <stdio.h>

#include <stdlib.h>

int main(void) {

               int choice;

               printf(" 1. Convert Decimal to Binary");

               fflush(stdout);

               printf(" 2. Sentence Cleanup");

               fflush(stdout);

               printf(" 3. SKU Converter");

               fflush(stdout);

               printf(" Enter a choice(1-3) : ");

               fflush(stdout);

               scanf("%d",&choice);

               switch(choice)

               {

                              case 1 : // call the function to convert decimal to binary

                                                                           printf(" Convert Decimal to Binary");

                                                                           break;

                              case 2 : // call the function for sentence cleanup

                                                                           printf(" Sentence Cleanup");

                                                                           break;

                              case 3 : // call the function for SKU Converter

                                                                           printf(" SKU Converter");

                                                                           break;

                              default: printf(" Wrong choice");

               }

               return EXIT_SUCCESS;

}