2. Conditional Statements Are statements that check an expression then may or may not execute a statement or group of statement depending on the result of the condition.
9. Write a program that will output “Congratulations!” if the student’s grade is greater than or equal 75.
10. Rem Clear Input G IF G>=75 THEN Print “Congratulations!” End
11. Write a program that will ask for a price. If the price is greater than 1000, compute a 10% discount from the original price. Display the computed discount.
16. Write a program to print for the sum of two numbers if the first no. is greater than the second no., otherwise print their difference
17. REM Clear Input x,y If x>y THEN S=x+y: Print S ELSE D=x-y : Print D End
18. Write a program that determines if the input age is qualified to vote or not. If qualified, displays “Qualified to Vote!” if not displays “Too Young!” We know that a qualifying age is 18 yrs. old and above.
19. REM Clear Input A If A>=18 THEN Print “Qualified to vote!” ELSE Print “Too Young!” End
20. NESTED IF or LADDERIZED IF-THEN-ELSE Statement is used if there are three or more possible conditions and outcomes to be executed.
21. SYNTAX IF condition1 THEN Expression1 ELSE IF condition2 THEN Expression N ELSE Expression
23. Write a program that displays an equivalent color once an input letter matches its first character for example b is for blue, r for red and so on. Here is the given criteria.
24. REM Clear Input x IF x=b THEN Print “Blue” ELSE IF x=r THEN Print “Red” ELSE IF x=g THEN Print “Green” ELSE IF x=y THEN Print “Yellow” ELSE Print “Unknown Color!”
26. Write a program to display the high school level of a student, based on its year entry number for example the year-entry 1 means the student is a freshmen, 2 for sophomore, and so on. Here are the given criteria: Year-Entry Number High School Level 1 Freshmen 2 Sophomore 3 Junior 4 Senior Other Entry No. Out-of-School
27. Write a program that examine the value of a variable called temp. then display the following messages depending on the value assigned to the temp. Temperature Message Less than 0 ICE Between 0 and 100 Water Exceeds 100 STEAM