Figure 1. Basic I/O Activity 1 Flowchart
Figure 1. Basic I/O Activity 1 Flowchart
Figure 1. Basic I/O Activity 1 Flowchart
Activity Section
a. Problem
Write a C program that will print the statement “Animo La
Salle!”
b. Algorithm
-Input: Enter “Animo La Salle!”
-Process:
-Output: “Display Animo La Salle!”
c. Flowchart
e. Program Output
Basic I/O Activity 2
a. Problem
Write a program that will determine the sum of two numbers.
b. Algorithm
Input: Enter two numbers (n1, n2)
Process: Compute for the sum (sum=n1+n2)
Output: Display the sum (sum)
c. Flowchart
e. Program Output
Basic I/O Activity 3
a. Problem
Write a program that will calculate the area of a circle.
b. Algorithm
Input: Enter the radius of a circle (r)
Process: Compute for the area of a circle (A=pi*r*r)
Output: Display the area of the circle (A)
c. Flowchart
e. Program Output
Basic I/O Activity 4
a. Problem
Write a C program that will compute for the average grade of
three quizzes.
b. Algorithm
Input: Enter the grades of the three quizzes (q1, q2, q3)
Process: Compute for the average of the three quizzes (Ave=
(q1+q2+q3/3)
Output: Display the average of the three quizzes
c. Flowchart
e. Program Output
Basic I/O Activity 5
a. Problem
Make a C program that will compute for the term grade given the
following:
a. 8 laboratory reports
b. 1 term project
c. 1 practical exam
b. Algorithm
Input: Enter the grades of 8 laboratory reports, term project, and
practical exam (a, b, c, d, e, f, g, h, t, p)
Process: Compute for the average of lab reports, ratings for each
subject, and final grade for the term (lra, tg, ra, pr, er)
Output: Display lab report rating, term project rating, practical exam
rating, and term grade (ra, pr, er, tg)
c. Flowchart
e. Program Output
III. Supplementary Section
Basic I/O Supplementary 1
a. Supplementary Worded Problem
Write a C program that will calculate the gross salary of Ana given
that her house allowance is 30% of basic salary, and medical
allowance is 20% of basic salary.
The third activity asks for the area of a circle. The user is asked for the radius
of a circle only. The program is expected to compute for the area. Multiplication is
also utilized in this program. The program also makes use of float for the value of
the area.
The fourth activity makes use of arithmetic operations mainly addition and
division. The program asks for the average of three quizzes, whereas the user is
expected to input three grades of the quizzes. The program also utilizes printf and
scanf statements. However, the program mainly shows the users the
implementation of arithmetic operation in C. Different variables are also used here,
where a float variable is used.
The first supplementary activity makes use of printf and scanf statements and
basic arithmetic operations. To be specific the arithmetic operations used are
multiplication, addition, and subtraction. The program asks for only one value, the
basic income of the individual. From this value, the user is expected to write a code
that will compute for three other data, which are the housing, medical, and gross
data. These values are expected to appear in the output window, and so the
utilization of the printf statement is present in this step of the program.
The second supplementary activity uses the printf and scanf statements
extensively. The program simply asks for data from the user and prints this in the
output screen. The second supplementary activity involved the making of a basic
resume. There are no arithmetic operations or other concepts than input and output
involved. Variables are also explored in this activity as these are used extensively.
The whole experiment explores the basic input and output function of C
programming. The experiment also explores basic arithmetic operations such as
addition and subtraction. This experiment gives the student an introductory idea of
some of the most basic concepts (printf, scanf) in C programming. The student is
expected to master these concepts as these are simply basic concepts.