Optimizing AI for immediate response in Smart CCTV
Programming Problem 2
1. Project # 2 Page 1 of 1
Mini-Project #2
Name: Date Performed:
Objectives:
• Subroutine
• If …else (via Error checking)
• ASCII to Hex
• Hex to ASCII
Instructions:
• Clear Screen
• Place all basic I/O routines as subroutines in your main program: Clear Screen, Read
String, Write String, Read character w/o echo, Skip line (i.e. “n”)
• Input #1: Name (30 characters)
• Check for null input, if exist issue an error message and input again
• Input #2: Age (2 characters)
• Check for null input, if exists issue an error message and input again
• Convert string length to ASCII so that you could display it properly
• Convert age input to integer so that you could manipulate it (AGE ! AGE+1)
• See the example below for the output
Name: <input your name here>
AGE : <input your age here>
The length of <name> is <string length>
Your age next year is <age+1>
Example:
Name: Juan dela Cruz
Age: 12
The length of Juan dela Cruz is 14
Your age next year is 13