Using your preferred programming language, write a program that will satisfy the following statement:
Given a sequence of positive integers in base 10, use the integer expansion technique (pg. 260 in textbook) to find the binary, octal, and hexadecimal expansion of each integer. Also, find the prime factorization of each integer of that sequence (procedure on pg. 273 in textbook).
Your program must read in a file of integers as a command-line argument. The input file will contain a sequence of positive integers (integers.txt) and your program should send your resulting output to a file with the binary, octal, and hexadecimal expansions and prime factorization of each given integer (output.txt
You will receive credit for this assignment if your program meets the following criteria:
- executes and functions properly,
- reads an argument from the command line,
- outputs results to a file,
- uses integer expansion technique from textbook,
- uses prime factorization procedure from textbook,
- finds correct binary expansion for each integer,
- finds correct octal expansion for each integer,
- finds correct hexadecimal expansion for each integer,
- and finds the correct prime factorization for each integer.