0% found this document useful (0 votes)
19 views3 pages

Lab Task 5

The document provides instructions for an assignment to write a C++ program called DisplayNumberSystems that will display the binary, octal, and hexadecimal equivalents of the numbers from 1 to 50. It specifies to use a switch statement to select conversion options and notes points that will be deducted for formatting, naming conventions, comments, missing loops, programs that don't compile/run, and missing source/executable files. Students are asked to submit the source code and capture/submit the output in a PDF file.

Uploaded by

Ehtisham Amjad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views3 pages

Lab Task 5

The document provides instructions for an assignment to write a C++ program called DisplayNumberSystems that will display the binary, octal, and hexadecimal equivalents of the numbers from 1 to 50. It specifies to use a switch statement to select conversion options and notes points that will be deducted for formatting, naming conventions, comments, missing loops, programs that don't compile/run, and missing source/executable files. Students are asked to submit the source code and capture/submit the output in a PDF file.

Uploaded by

Ehtisham Amjad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment Name Lab Task 5 Submitted By

Subject Programming Fundamentals Muhammad Ehtisham Amjad


Submitted to Dr. Naseer Jan Dated
Program BSSE-II-B March 10, 2024

TASK TO PERFORM
Write a C++ program called DisplayNumberSystems that will display the binary, octal, and
hexadecimal equivalents of the first 50 decimal numbers from 1 to 50. Use Switch statement to
select options of converting decimal to binary, decimal to octal, decimal to hexadecimal, etc.
Important Notes:
Comment each statement or block of statements and explain the purpose of each statement or
block of statements. The C++ program should compile and run without any errors against the
output given in this assignment. Marks or points will be deducted based on the following points:
 Formatting [10 points]
 Naming convention for variables [10 points]
 Comments [10 points]
 Missing loop where required [10 points]
 Program doesn’t compile and run [70 points ]
 Source code (.cpp file) and executable file missing [100 points]
 Turn in to student’s portal (teams)
 Write the program, follow steps, execute your program, capture output and submit a pdf file to
the portal (teams).
 Submit source code: DisplayNumberSystems.cpp,
 Execute all possible test cases and document your results in pdf against different inputs
 We discussed memory types in detail. Copying, plagiarism, and sharing your answers with other
students is strictly prohibited and disciplinary action will be initiated against such students

PERFORMANCE
1. WRITE A C++ PROGRAM CALLED DISPLAYNUMBERSYSTEMS THAT WILL
DISPLAY THE BINARY, OCTAL, AND HEXADECIMAL EQUIVALENTS OF THE
FIRST 50 DECIMAL NUMBERS FROM 1 TO 50. USE SWITCH STATEMENT TO
SELECT OPTIONS OF CONVERTING DECIMAL TO BINARY, DECIMAL TO
OCTAL, DECIMAL TO HEXADECIMAL, ETC.
1.1 CODE
The screenshot of the C++ code for the above problem is down below:
1.2 OUTPUT
The output for the given program is:

You might also like