2023 Develop a C or C program that reads an unsigned number in | Assignment Collections

Computer Science 2023 C Programming – Basic

2023 Develop a C or C program that reads an unsigned number in | Assignment Collections

Develop a C (or C++) program that reads an unsigned number in some base and outputs the

equivalent value in BCD.

Your program must require a single command line argument, the name of an input file. This

input file will consist of any number of lines, each falling into one of three varieties:

1. Comment – These lines always start with an asterisk (‘*’) and should be completely

ignored.

2. Blank line – Used to visually organize the input file and should be completely ignored.

3. Data line – These are the ones your program will process and are described below.

Data lines will all have exactly two items separated by a single space character:

1. an input base (2 through 16) and

2. an input value in that base whose decimal equivalent will never be more than 6 digits

For each Data line from the input file, you must output:

1. the line number of the input file this data line is on (starting the file with line 1… same as

a text editor would show)

2. a colon followed by a space

3. the BCD equivalent of the input value , four bits at a time with one space between each

set of bits. Remember the decimal values will not exceed 6 digits, so the BCD value will

never exceed 24 bits, not including whitespace between 4-bit sets. NEVER print any

leading bit sets that contain only zeros…

a. eg, instead of 0000 0101 0000 1000, you would print 0101 0000 1000

b. only exception is if the value itself is zero, as in the example below

Example input file Expected output to console

* a first example

2 011000

8 70

7 0

11 3A

* This is long

10 123456

Results

2: 0010 0100

4: 0101 0110

5: 0000

6: 0100 0011

9: 0001 0010 0011 0100 0101 0110

 

We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.

Place Order Now

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational