SlideShare a Scribd company logo
1 of 14
BTCS 1213
 PROGRAMMING FUNDAMENTAL



             MEMBER’S NAME:
1. MUHAMMAD AFIQ BIN ABDUL RAHMAN
2. NURULJANNAH BINTI AB SAMAT
3. NUR’AFIQAH BINTI ABDUL AZIZ
INTRODUCTION
• Waves can be form by two ways which is by
  moon gravitational pull or by wind.
• The highest point of a wave is the crest and the
  lowest point is the through.
• The difference between the two is known as the
  wave height.
• The principle of superposition of waves states
  that when two or more waves are incident on the
  same point, the total displacement at that point
  is equal to the vector sum of the displacements
  of the individual waves.
• Wave interference can be constructive or
  destructive in nature.
OBJECTIVES
• To creat the FILA table for the problem based
  learning(PBL)
• To familiarize with C programming control
  structure.
• To create the program from the task given.
• To create a flowchart based on software
  requirement.
• To perform programming by creating a flowchart.
• To work effectively in given task in group.
Equipment



C FREE 4
software
PROCEDURE
• 1. Create software to run the requirement for task that is given, which is:

• Estimate of the maximum wave height of the combined waves. Write a
  program that will allow the user to enter the period (s) and the wave
  height of two waves. Compute 200 points of the sum of the two waves.

• Hint: Include Math.h library in your source file.

•   2 Draw the flowchart to know the flow of your software.
•   3 Based on the flowchart; write the program in C-Free.
•   4 Compile or build the project and run the program.
•   5 Test the program by entering the appropriate input from keyboard.
BLOCK DIAGRAM


         Period 1
                                                     Length1 = 5.13*T1^2
wave 1
         Height 1              Wavelength
                                                     Length2 = 5.13*T1^2
                     PROGRAM
         Height 2
wave 2
                               Max wave height of the combination
         Period 2              from two waves
START



        printf : Enter integer wave period(s) and wave height(feet)
        printf : For wave 1
        printf : Enter integer wave period(s) and wave height(feet)
        printf : For wave 2
        printf : Wavelengths(feet) are: Length1,Length2)


    C
F                             Length1 = 5.13*T1*T1;
                              Length2 = 5.13*T2*T2;

    H                         New_period = T1*T2;

L                          Time_incr =New_period/200;
                                 A1 = Height1/2

    A                            A2 = Height2/2
                                  Freq1 = 1/T1

O                                 Freq2 = 1/T2


    R
W                            For (C=0; C<=199; C++)


    T                           T = C*Time_incr;
                            W1 = A1*sin(2*pi*Freq1*T)
                            W2 = A2*sin(2*pi*Freq2*T)

                                                                      FALSE
                               if (Sum > Maxwave)
         YES
                                Sum = Maxwave
                            New_height = Maxwave*2;

                                       END
R
E
S
U
L
T
OUTPUT
 We  use #include<stdio.h>, #include <math.h> and
    #define PI 3.141593
D   Declare variables “int k” and “double” .
     determine and print wavelength by formula given;
I          Length1 = 5.13*T1^2
S          Length2 = 5.13*T2^2
C   For compute 200 points of the sum of the two
U   waves and estimate of the maximum wave height of
    the combined, we use the formula;
S          W1 = Vp1*sin(2*PI*Frequency1*t);
S          W2 = Vp2*sin(2*PI*Frequency2*t);
I          Sum = W1 + W2;
O
N
CONCLUSION
• After this project we are able to create the new program
  based on the given problem. We also are able to know
  more about how to used a C free 4, besides be more
  familiar with the C programming control structure.
• On the other hand, we should learn how to creat the FILA
  table for the problem based learning(PBL). And also about
  action plan is about team discussion.
• To create the program from the task given and also to
  create a flowchart based on software requirement. We also
  know to perform programming by creating a flowchart.

More Related Content

Similar to programming

Introduction to C++ lecture ************
Introduction to C++ lecture ************Introduction to C++ lecture ************
Introduction to C++ lecture ************Emad Helal
 
Dam31303 lab sheet 4
Dam31303 lab sheet 4Dam31303 lab sheet 4
Dam31303 lab sheet 4alish sha
 
Antenna &amp; wave lab manual
Antenna &amp; wave lab manualAntenna &amp; wave lab manual
Antenna &amp; wave lab manualamanabr
 
Lab sheet 4 bti1022
Lab sheet 4 bti1022Lab sheet 4 bti1022
Lab sheet 4 bti1022alish sha
 
C language by Dr. D. R. Gholkar
C language by Dr. D. R. GholkarC language by Dr. D. R. Gholkar
C language by Dr. D. R. GholkarPRAVIN GHOLKAR
 
Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10alish sha
 
Communication Engineering class 1
Communication Engineering class 1Communication Engineering class 1
Communication Engineering class 1rmkrva
 
Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Hermann Hueck
 
Lo3 position and time plots
Lo3   position and time plotsLo3   position and time plots
Lo3 position and time plotsJessica Weng
 
Class D Audio Amplifier using PSpice
Class D Audio Amplifier using PSpiceClass D Audio Amplifier using PSpice
Class D Audio Amplifier using PSpiceTsuyoshi Horigome
 
Introduction to Oscilloscope and Function generator
Introduction to Oscilloscope and Function generatorIntroduction to Oscilloscope and Function generator
Introduction to Oscilloscope and Function generatorcyberns_
 
3DoF Helicopter Trim , Deceleration manouver simulation, Stability
3DoF Helicopter Trim , Deceleration manouver simulation, Stability 3DoF Helicopter Trim , Deceleration manouver simulation, Stability
3DoF Helicopter Trim , Deceleration manouver simulation, Stability Deepak Paul Tirkey
 

Similar to programming (20)

Introduction to C++ lecture ************
Introduction to C++ lecture ************Introduction to C++ lecture ************
Introduction to C++ lecture ************
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Dam31303 lab sheet 4
Dam31303 lab sheet 4Dam31303 lab sheet 4
Dam31303 lab sheet 4
 
Antenna &amp; wave lab manual
Antenna &amp; wave lab manualAntenna &amp; wave lab manual
Antenna &amp; wave lab manual
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
C++ lab 1
C++ lab 1C++ lab 1
C++ lab 1
 
Lab 1:c++
Lab 1:c++Lab 1:c++
Lab 1:c++
 
Lab sheet 4 bti1022
Lab sheet 4 bti1022Lab sheet 4 bti1022
Lab sheet 4 bti1022
 
DSP 2.pdf
DSP 2.pdfDSP 2.pdf
DSP 2.pdf
 
C language by Dr. D. R. Gholkar
C language by Dr. D. R. GholkarC language by Dr. D. R. Gholkar
C language by Dr. D. R. Gholkar
 
Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10Bti1022 lab sheet 9 10
Bti1022 lab sheet 9 10
 
Communication Engineering class 1
Communication Engineering class 1Communication Engineering class 1
Communication Engineering class 1
 
Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)Composing an App with Free Monads (using Cats)
Composing an App with Free Monads (using Cats)
 
Lo3 position and time plots
Lo3   position and time plotsLo3   position and time plots
Lo3 position and time plots
 
Sliding door
Sliding doorSliding door
Sliding door
 
Class D Audio Amplifier using PSpice
Class D Audio Amplifier using PSpiceClass D Audio Amplifier using PSpice
Class D Audio Amplifier using PSpice
 
Labsheet_3
Labsheet_3Labsheet_3
Labsheet_3
 
C programming
C programmingC programming
C programming
 
Introduction to Oscilloscope and Function generator
Introduction to Oscilloscope and Function generatorIntroduction to Oscilloscope and Function generator
Introduction to Oscilloscope and Function generator
 
3DoF Helicopter Trim , Deceleration manouver simulation, Stability
3DoF Helicopter Trim , Deceleration manouver simulation, Stability 3DoF Helicopter Trim , Deceleration manouver simulation, Stability
3DoF Helicopter Trim , Deceleration manouver simulation, Stability
 

Recently uploaded

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 

Recently uploaded (20)

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 

programming

  • 1. BTCS 1213 PROGRAMMING FUNDAMENTAL MEMBER’S NAME: 1. MUHAMMAD AFIQ BIN ABDUL RAHMAN 2. NURULJANNAH BINTI AB SAMAT 3. NUR’AFIQAH BINTI ABDUL AZIZ
  • 2. INTRODUCTION • Waves can be form by two ways which is by moon gravitational pull or by wind. • The highest point of a wave is the crest and the lowest point is the through. • The difference between the two is known as the wave height. • The principle of superposition of waves states that when two or more waves are incident on the same point, the total displacement at that point is equal to the vector sum of the displacements of the individual waves. • Wave interference can be constructive or destructive in nature.
  • 3. OBJECTIVES • To creat the FILA table for the problem based learning(PBL) • To familiarize with C programming control structure. • To create the program from the task given. • To create a flowchart based on software requirement. • To perform programming by creating a flowchart. • To work effectively in given task in group.
  • 5. PROCEDURE • 1. Create software to run the requirement for task that is given, which is: • Estimate of the maximum wave height of the combined waves. Write a program that will allow the user to enter the period (s) and the wave height of two waves. Compute 200 points of the sum of the two waves. • Hint: Include Math.h library in your source file. • 2 Draw the flowchart to know the flow of your software. • 3 Based on the flowchart; write the program in C-Free. • 4 Compile or build the project and run the program. • 5 Test the program by entering the appropriate input from keyboard.
  • 6.
  • 7.
  • 8. BLOCK DIAGRAM Period 1 Length1 = 5.13*T1^2 wave 1 Height 1 Wavelength Length2 = 5.13*T1^2 PROGRAM Height 2 wave 2 Max wave height of the combination Period 2 from two waves
  • 9. START printf : Enter integer wave period(s) and wave height(feet) printf : For wave 1 printf : Enter integer wave period(s) and wave height(feet) printf : For wave 2 printf : Wavelengths(feet) are: Length1,Length2) C F Length1 = 5.13*T1*T1; Length2 = 5.13*T2*T2; H New_period = T1*T2; L Time_incr =New_period/200; A1 = Height1/2 A A2 = Height2/2 Freq1 = 1/T1 O Freq2 = 1/T2 R W For (C=0; C<=199; C++) T T = C*Time_incr; W1 = A1*sin(2*pi*Freq1*T) W2 = A2*sin(2*pi*Freq2*T) FALSE if (Sum > Maxwave) YES Sum = Maxwave New_height = Maxwave*2; END
  • 11.
  • 13.  We use #include<stdio.h>, #include <math.h> and #define PI 3.141593 D Declare variables “int k” and “double” .  determine and print wavelength by formula given; I Length1 = 5.13*T1^2 S Length2 = 5.13*T2^2 C For compute 200 points of the sum of the two U waves and estimate of the maximum wave height of the combined, we use the formula; S W1 = Vp1*sin(2*PI*Frequency1*t); S W2 = Vp2*sin(2*PI*Frequency2*t); I Sum = W1 + W2; O N
  • 14. CONCLUSION • After this project we are able to create the new program based on the given problem. We also are able to know more about how to used a C free 4, besides be more familiar with the C programming control structure. • On the other hand, we should learn how to creat the FILA table for the problem based learning(PBL). And also about action plan is about team discussion. • To create the program from the task given and also to create a flowchart based on software requirement. We also know to perform programming by creating a flowchart.