Name: Score: Name: Score:
Course & Section: Course & Section:
Laboratory Activity # 2 Laboratory Activity # 2
Activity 1: Print a Simple Pattern Activity 1: Print a Simple Pattern
Objective: Practice using the printf() function to display a simple pattern. Objective: Practice using the printf() function to display a simple pattern.
Task: Write a program that prints the following pattern: Task: Write a program that prints the following pattern:
Activity 2: Simple Calculator Activity 2: Simple Calculator
Objective: Understand how to declare variables and use arithmetic operators. Objective: Understand how to declare variables and use arithmetic
operators.
Task: Write a program that calculates the sum, difference, product and
quotient of two numbers. Task: Write a program that calculates the sum, difference, product and
quotient of two numbers.
Activity 3: Personal Introduction
Activity 3: Personal Introduction
Objective: Practice working with strings and the printf() function.
Objective: Practice working with strings and the printf() function.
Task: Write a program that outputs your name, age and a short description
about yourself. Task: Write a program that outputs your name, age and a short description
about yourself.