You are on page 1of 11

CHAPTER I

INTRODUCTION

A. Background

Physics is a branch of Natural Sciences (IPA). related to scientific processes,


attitudes, and products. Physics is required to study natural phenomena that require
the ability to think logically and act in a systematic, integrated and comprehensive
manner. Students and students expected not only to learn about scientific concepts,
theories, and facts, but also the application of physics in everyday life. Finding the
volume of a geometric shape is one of the basic concepts in mathematics relating to
measuring the space filled by an object three dimensions. In this material, we will
study various formulas and methods for calculate the volume of various types of
geometric shapes, such as cubes, blocks, cylinders, cones, and balls.

Volume is a measure that describes how much space is occupied by a three-


dimensional object. This concept is often applied in the field physics, engineering,
architecture, and other fields that require modeling and space calculation. The
condition in the if function is the expression or statement that is evaluated as true
(True) or false (False). If the condition is true, then the code block is in in if will be
executed. If the condition is false, then the code block inside the else (optional) will
run. In addition, you can also use the if-elif-else structure In this experiment, an
algorithm and programming calculation will be made volume build space using the if
function in C language.
B. Purpose
The practicum aims are:
1. Make a program to calculate geometric shapes with the IF function.
C. Problem Formula
The formulation of the problem in practice is:
1. How to make a program to calculate geometric shapes with IF function.
D. Benefits
The benefits of practicum are:
1. So that students can make a program to calculate geometric shapes
with the IF function.
CHAPTER II
LITERATURE REVIEW

Algorithm is a sequence of steps in solving a problem. Basically the computer


can not do anything without commands from humans. Structured and systematic
commands make the computer work according to what is desired according to the
program the computer can be programmed for various jobs, say programmed to
calculate an expression mathematics and displays the results on a computer screen,
programmed to processing data such as searching data or sorting data, and so on.
Condition The main thing in making the program are the commands given in the
program must be understood by the computer (Aji & Rahmanti, 2021: 4).
Programming language, or often also termed language computer or computer
programming language, is standard instruction for rule the computer. This
programming language is a set of the syntax and semantic rules used to define
computer programs. This language allows a programmer. can determine exactly
which data will be processed by the computer, how this data will be stored forwarded,
and what type of steps exactly to take in various situations (Saragih, 2021: 12).
C language is in the category of programming languages that can distinguish
the size of the letters used in writing program code, or often called case sensitive, this
means in writing program code must be more careful, because if one writes the size
of the letters will be affect the final results of the program (Khakim, 2019; 6).
In Indonesian, the if program code states "if condition or the condition is true
then do the statement and if the condition or conditions are false then do another
statement (else), in this case statementz. the word if (if)used in determining the
appropriate choice in the C programming language. (Sudiarta, 2018: 62).
In practical we make a program using the if function in finding the volume of
a geometric shape. Volume or it can also be called capacity is the calculation of how
much space can be occupied in an object. The object can be a regular object or an
irregular object. Regular objects such as cubes, blocks, cylinders, pyramids, cones,
and balls. Irregular objects such as rocks found on the road. Volume used to
determine the density of an object. Meanwhile, according to the dictionary In science,
volume is the space occupied by an object. Every wake space has the contents
contained by the shape of the space. Both solid and empty/empty, the shape of the
space still has content. In the language of science, content that fills this shape is also
known as volum (Syahbana, 2013: 2).

In finding the volume of a block, the formula used is:


V=pxlxt
With, V = Block Feed
l = Beam Width
t = block height (Siswono, 2017: 227).
CHAPTER III
PRACTICUM METHOD

1. Time/Place
This practicum will be held on Friday,May 28 May 2023,at 13:00 WITA .Located
in the Computer Laboratory ,Deoartment of Physics ,Faculty of Mathematics and
Natural science ,Makassar State University.
2. Implementation
In C, the if function has codes that have meaning alone. The following is an
explanation of the meaning of each code in the inner if function C language:
a. condition`: Represents an expression or statement that evaluates as true (non-
zero) or false (zero). If the condition evaluates to true, then the code block is
in in if will be executed. If the condition evaluates to false, then the code
block is inside else (optional) will be executed.
b. `// Block of code that is executed if the condition is true (True)`: Is part of
code to be executed if the condition in if evaluates to true. Code block these
should be enclosed in curly brackets `{}` to indicate the code block boundary
the.
c. `// Block of code that is executed if the condition is false (False)`: Is part of
code to be executed if the condition in if evaluates to false. Code block these
must also be enclosed in curly braces `{}` and are optional, meaning can be
removed if not needed.It should be noted that in C language, conditions are
evaluated in the if function must return a boolean value (0 for false, non-zero
for true). If the condition is an expression, then the evaluation result will be
considered as conditions checked.
For example, if you have the condition `x > 5`, then if the value of `x` is greater
than 5, the condition will evaluate to true and the code block in the if will be
executed. If the condition is false, the code block in else (if any) is executed. Ensure
to line up code blocks properly and provide curly braces appropriate to denote the
boundary of the block of code to be executed.
3. Working Principle
In calculating the volume of a geometric shape with the if function in C, the
principle Work generally involves the following steps:
a. Variable declaration: Declare the variables needed to store length, width,
height, and volume values.
b. Enter values: Use user input or initialize the values of these variables
c. If function to calculate volume: Use if-else structure to check types of
geometric figures and calculate their volume based on the existing variables.
d. Calculation result output: Use printf to display wake volume space for users.
CHAPTER IV
RESULTS AND DISCUSSION

A. Programming Results
1. Activity 1: Calculating the volume of a geometric shape (cube)
a. Program screenshots

b. Results Program
B. Data Analysis and Interpretation
 Is known :
Length = 52
Width = 17
Height = 20
 Wanted : Volume of the block
 Settlement
V=pxlxt
V = 52 x 17 x 20
V = 17,680
So if the length of the block is 52, the width of the block is 17 and the height

of the block is 20 , then the volume of the rectangular shape is 17,680.

C. Discussion
The above analysis includes the calculation of beam volume based on length,
given width and height. The following is an explanation of the analysis along with an
explanation in C language:
1. In this analysis, information about length, width, and height is given beam.
The length of the block is 52, the width of the block is 17, and the height of
the block is 20.
2. The purpose of the analysis is to find the volume of the beam based on the
data given.

3. Completion of the analysis is carried out using the volume formula of the
beam, i.e. V = length × width × height.

4. In C language, we can use integer variable (`int`) to stores length, width,


height, and volume values.

5. In the analysis in C language, the steps taken are as follows following:

 Declaration of `length`, `width`, `height` and `volume` variables as types


integer data.

 Using the `=` operator to initialize the `length` variable, `width`, and
`height` with the given values.

 Using the `*` operator to multiply the variables `length`, `width`, and
`height` to get the volume value.

 Display volume results using the `printf` function.

In the code above, the values for length, width, and height are assigned
arbitrarily directly through variable initialization. Then, the formula for the volume of
a `long* width * height` is used to calculate the volume. The volume result is
displayed using the `printf` function. There is an error in the program, this is due to
an error in the practice in writing programs that involve the use of the percent sign
(%), semicolon (;), and curly braces ({}) in the C if function, this can cause syntax
problems, logic, or changes in behavior program.
CHAPTER V
CLOSING

A. Conclusion
Based on computer programming experiments that have been done the following
conclusions are obtained:
1. Based on the practicum that has been done to make a program calculating
wake-up space with the IF function can use the formula find the volume of the
block. The function accepts three arguments: Length, width and high. Then,
inside the main function, the user is prompted to Enter length, width and
height values using scanf. After that, we call the calculate volume shape
function with the value yang input and store the result in variable volume.
Finally, us print the volume of the block using printf.
B. Suggestion
Based on computer programming experiments that have been done, I I will give
suggestions that are constructive, namely: Practitioners can understand the practicum
material well, practice programming a lot, and also understand the meaning of the
symbols and also the signs used in programming so that the practicum can run
smooth and optimal. expected and continue to guide and pay attention Practitioners at
the time the practicum takes place For laboratory assistants, it is expected to provide a
ready-to-use computer.
BIBLIOGRAPHY

Aji, Rahmanti. 2021: Fundamentals of programming in C. Yogyakarta :

DEEPUBLISH PUBLISHERS

Judge. 2019. ATMega 328 macrocontroller textbook. Central Java: PT Nasya

Expanding Management (NEM Issuer – IKAPI Member).

Sudiarta, Akmaluddin. 2018. C programming for solving cases.

Yogyakarta : Pot Publisher.

shahbana. 2013. Alternative understanding of the general concept of the volume of a


geometric shape.

Education Volume 03 number 02.

Siswono, lastiningsi. 2016. Mathematics. Jakarta: CV. KANAKA MEDIA

You might also like