Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

CASE STUDY – Comp223

1. CURRENCY
Create a program that will convert different currency into peso. The user must first
select currency available, input the amount to be converted and then convert it into peso. If
the user input an invalid choice, for example 5, the user is prompted that he entered an
invalid choice and has to enter a valid choice. This will be repeated until the user entered a
valid choice in the selection. The user is also prompted if he wants to convert again or exit
the program. If the user wants to continue and convert again, the program will clears the
screen and begin to start. If the user doesn’t want to continue, the program will exit and
return control to operating system.

1 US Dollar = 43pesos
1 AU Dollar = 40pesos
1 Dinar = 76pesos
1 Euro = 150pesos
Sample output:

Valid Choice:

Please select currency below:


[1] US dollar
[2] AU dollar
[3] Dinar
[4] Euro

Enter your choice: 1


Enter the amount to be converted: 100
US dollar to Peso: P4300

Do you want to continue? //CX-input


[1] To convert again…
[2] To exit the program…

Choice: 1

Invalid Choice:

Please select currency below:


[1] US dollar
[2] AU dollar
[3] Dinar
[4] Euro

Enter your choice: 5


Invalid selection, please try again!
Enter your choice:
2. PASSCODE

Create a program that will prompt the user to enter a 4-digit passcode. The user
passcode is then compared with the preset passcode. If the passcodes are not the same, the
program will ask the user for another passcode. This will be repeated until the user has
entered the matching passcode. In this case, the compare string instruction (CMPSB) is used
to compare the elements of both passcodes (strings) in order to determine whether they
are the same or different.

Sample outputs:

For correct passcode:

Enter passcode: ****

Passcode correct!

For Incorrect passcode:

Enter passcode: ***

Passcode incorrect! Please try again!

Enter passcode:

Deadline of Submission:
January 28, 2011 until 9pm only, NO EXTENSION!!!

 Submit softcopy and printed or hardcopy of the code and output in a


short bond paper. Using the format below:
CASE STUDY
IN
COMP223

Submitted by:
Lastname, Firstname MI
Year&Section

Submitted to:
Engr. Maria Diorella A. Paguio

Date Submitted

You might also like