Instructor: Yasin Nasir Thursday, October 11,2018
Coal Lab 5
(BCS-F17-AFt)
Instructions:
Attempt all tasks in the given order.
Discussion with each other is not allowed.
Must Validate your input
Task 1: Write a program that prompts the user to enter a number, and
print following pattern on screen. Follow Sample Execution
Sample execution:
Enter A Number: 5
Task 2: Write a program that prompts the user to enter string and print
the length of string on next line
Sample execution:
Type a String: BCSF17 AFTERNOON
Length of String is: 16
Instructor: Yasin Nasir Thursday, October 11,2018
Task 3: Write a program that prompts the user to enter string and print
that string in reverse order by using loop.
Sample execution:
Type a String: BCSF17 AFTERNOON
Reversed String is: NOONRETFA 71FSCB
Task 4: Write a program that prompts the user to enter a Binary
number of 16 digits or less, and output it in Hex on next line.
Sample Execution:
Type a Binary Number upto 16 digits: 11100001
In Hex it is: E1