Integer expansion technique Solved

45.00 $

Categories: ,
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

5/5 - (1 vote)

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:

  1. executes and functions properly,
  2. reads an argument from the command line,
  3. outputs results to a file,
  4. uses integer expansion technique from textbook,
  5. uses prime factorization procedure from textbook,
  6. finds correct binary expansion for each integer,
  7. finds correct octal expansion for each integer,
  8. finds correct hexadecimal expansion for each integer,
  9. and finds the correct prime factorization for each integer.
  • 7-dtefiq.zip