You are on page 1of 2

ACTIVITY 6: USING STRUCTURE DATA TYPE TO SIMPLYING DATA PROCESSING

I. Objectives
a. To be able to know the use of structure data type in data processing.
b. To be able to know how structure data type are implemented in programming syntax.
c. To be able to use structure data type to simply handling of multiple data.
d. To be able to understand and apply structure data type in your programming code solutions.
e. To be able to arrange data types into a single structure as appropriate to simplify processing of data.
f. To be able to create an efficient programming code solution by using structure data type.

II. Activity Procedure


1. Set-up the Computer System a. Power-on your designated computer system
b. Log-in your laboratory account details.
c. Run the designated Integrated Development Environment (IDE) software use in the course.

2. Create a folder on your account drive for Laboratory Activity 6.


3. In the Integrated Development Environment (IDE) software, a. Create new file
b. Save the file by renaming it to specified by the instructor.
c. Save your file under the folder Laboratory Activity 6

Example: “DELACRUZ_LabActivity_6_Problem1”
Note: The file extension depends on the programming language introduced in the course.
4. Solve the problems found in the Activity Sheet 6. For each problem corresponds to one program file.
5. Compile and Run your coded program every after writing your solution code for each problem to see
the output.
6. See sample input and output found in the Sample Input and Output found after each problem to
validate your solution.
7. Notify your instructor for checking your work when all problems are solved in this laboratory
activity.
8. Create a back-up copy of your program files. Note: You need to create back-up in case your program
files will be lost or corrupted.
9. Answer the follow-up questions in the Activity Sheet 6.
10. Submit your Activity Sheet 6 to your instructor.
Activity Sheet 6
USING STRUCTURE DATA TYPE TO SIMPLYING DATA PROCESSING
PROGRAMMING EXERCISES

1. Using structure create a program that will ask the user’s name and input their grades
for 10 students and displays it after.
2. Using array structure create a program that will compute an employee’s salary.
SAMPLE:

INPUT SALARY: 50 000


Deductions
PAG IBIG:2000
SSS: 1300
INSURANCE:1000
NET SALARY:45700
3. Write a C program to add two distances entered by user. Measurement of distance should be
in inch and feet (Note: 12 inches = 1 foot)
SAMPLE:
1ST DISTANCE
Enter feet: 12
Enter inch: 7.9
2ND DISTANCE
Enter feet: 2
Enter inch: 9.8
Sum of distances= 15'-5.7"
4. Write a program that can store an employee’s bank account number, Account Name, Account
Current Balance, Date of Transaction, and the amount he would like to withdraw, and the
Account final Balance. Note that this is all an input function, the output should be displayed
after transaction.
5. Write a structure to store the names, salary and hours of work per day of 10 employees in a
company. Write a program to increase the salary depending on the number of hours of work
per day as follows and then print the name of all the employees along with their final salaries.

Hours of work per day 8 10 >=12


Increase in salary $50 $100 $150

You might also like