The document discusses various conditional and looping constructs in C programming such as if, if-else, else-if ladder, nested if, switch, while, do-while and for loops. It provides the syntax, flowchart and examples for each construct. Key topics covered include the structure of conditional statements, looping constructs, usage of break, continue and goto keywords to control program flow. Nested loops and comparisons between while, do-while and for loops are also presented.
C Programming - Decision making, LoopingMURALIDHAR R
Execution of a statement or set of statement repeatedly is called as looping.
The loop may be executed a specified number of times and this depends on the satisfaction of a test condition.
A program loop is made up of two parts one part is known as body of the loop and the other is known as control condition.
Depending on the control condition statement the statements within the loop may be executed repeatedly.
Depending on the position of the control statement in the loop, a control structure may be classified either as an entry controlled loop or as an exit controlled loop.
Entry Controlled Loop:
When the control statement is placed before the body of the loop then such loops are called as entry controlled loops.
If the test condition in the control statement is true then only the body of the loop is executed.
If the test condition in the control statement is not true then the body of the loop will not be executed. If the test condition fails in the first checking itself the body of the loop will never be executed.
This document discusses control statements in C language including if-else statements, switch statements, loops (while, do-while, for), and jump statements (break, continue, goto). It provides examples of each statement type and explains their usage and flow. Key control statements covered are if-else statements for simple and nested conditional logic, switch statements for multiple alternatives, loops for repetitive execution, and jump statements for early exits or skipping parts of loops.
The document discusses various control structures in C++ including decision making statements like if, else if, switch, and loops like for, while, and do-while. It provides examples and explanations of how each control structure directs the flow of a program based on conditions or iterations. Specific points covered include simple if statements, if-else, nested if-else, else if ladders, switch statements, break statements, for loops, while loops, and do-while loops. Flowcharts are also provided to illustrate the logic flow for some of the control structures.
A while loop in C programming
repeatedly executes a target
statement as long as a given
condition is true.
A while loop in C programming
repeatedly executes a target
statement as long as a given
condition is true.
The document discusses different types of statements in Java including decision and repetition statements. It covers if, if-else, switch statements for decision making and while, do-while, for loops for repetition. It provides examples of each statement type and discusses when to use each one. It also covers block statements, comparing characters and strings, and avoiding infinite loops.
This document discusses different types of loops in programming - for loops, while loops, and do-while loops. It provides examples of each loop type and explains their syntax and usage. The key points are:
- For loops allow specifying an initialization, condition, and increment in one line and are best for known iterations.
- While loops repeat until a condition is false and are useful when the number of iterations is unknown.
- Do-while loops are similar but check the condition after running the block once, guaranteeing it runs at least once.
- Loops can be nested, with inner loops running fully each time the outer loop increments.
The document discusses different types of loops in programming languages. It defines looping as repetitively executing a sequence of statements, which is an important concept that allows programs to repeat tasks. There are two main types of loops - entry controlled loops where the test condition is checked before the loop body executes, and exit controlled loops where the test is checked after execution. Common loops in C include the for, while, and do-while loops. The for loop is entry controlled and uses a counter variable, while the while and do-while can use counters or sentinel values and are entry and exit controlled respectively. Selecting the right loop depends on pre-test or post-test needs as well as whether the number of repetitions is known.
C Programming - Decision making, LoopingMURALIDHAR R
Execution of a statement or set of statement repeatedly is called as looping.
The loop may be executed a specified number of times and this depends on the satisfaction of a test condition.
A program loop is made up of two parts one part is known as body of the loop and the other is known as control condition.
Depending on the control condition statement the statements within the loop may be executed repeatedly.
Depending on the position of the control statement in the loop, a control structure may be classified either as an entry controlled loop or as an exit controlled loop.
Entry Controlled Loop:
When the control statement is placed before the body of the loop then such loops are called as entry controlled loops.
If the test condition in the control statement is true then only the body of the loop is executed.
If the test condition in the control statement is not true then the body of the loop will not be executed. If the test condition fails in the first checking itself the body of the loop will never be executed.
This document discusses control statements in C language including if-else statements, switch statements, loops (while, do-while, for), and jump statements (break, continue, goto). It provides examples of each statement type and explains their usage and flow. Key control statements covered are if-else statements for simple and nested conditional logic, switch statements for multiple alternatives, loops for repetitive execution, and jump statements for early exits or skipping parts of loops.
The document discusses various control structures in C++ including decision making statements like if, else if, switch, and loops like for, while, and do-while. It provides examples and explanations of how each control structure directs the flow of a program based on conditions or iterations. Specific points covered include simple if statements, if-else, nested if-else, else if ladders, switch statements, break statements, for loops, while loops, and do-while loops. Flowcharts are also provided to illustrate the logic flow for some of the control structures.
A while loop in C programming
repeatedly executes a target
statement as long as a given
condition is true.
A while loop in C programming
repeatedly executes a target
statement as long as a given
condition is true.
The document discusses different types of statements in Java including decision and repetition statements. It covers if, if-else, switch statements for decision making and while, do-while, for loops for repetition. It provides examples of each statement type and discusses when to use each one. It also covers block statements, comparing characters and strings, and avoiding infinite loops.
This document discusses different types of loops in programming - for loops, while loops, and do-while loops. It provides examples of each loop type and explains their syntax and usage. The key points are:
- For loops allow specifying an initialization, condition, and increment in one line and are best for known iterations.
- While loops repeat until a condition is false and are useful when the number of iterations is unknown.
- Do-while loops are similar but check the condition after running the block once, guaranteeing it runs at least once.
- Loops can be nested, with inner loops running fully each time the outer loop increments.
The document discusses different types of loops in programming languages. It defines looping as repetitively executing a sequence of statements, which is an important concept that allows programs to repeat tasks. There are two main types of loops - entry controlled loops where the test condition is checked before the loop body executes, and exit controlled loops where the test is checked after execution. Common loops in C include the for, while, and do-while loops. The for loop is entry controlled and uses a counter variable, while the while and do-while can use counters or sentinel values and are entry and exit controlled respectively. Selecting the right loop depends on pre-test or post-test needs as well as whether the number of repetitions is known.
The document discusses different types of loops in Java including while, do-while, and for loops. It explains the syntax and flow of each loop type and provides examples of how and when to use each loop. The document also covers break and continue statements that can be used inside loops to control flow, as well as increment and decrement operators.
This document summarizes different types of loops in C programming: for loops, while loops, and do-while loops. It explains the basic structure of each loop type, including where the initialization, test condition, and updating of the loop variable occurs. It also distinguishes between entry controlled loops (for and while) and exit controlled loops (do-while). Additional loop concepts covered include break and continue statements, and sentinel controlled loops. Examples are provided to illustrate usage of each loop type.
The document discusses the different types of loops in C language: while loop, do-while loop, and for loop. It provides the syntax and an example of each loop. The while loop checks the condition first and repeats the block of code as long as the condition is true. The do-while loop ensures the block of code executes at least once before checking the condition. The for loop allows initialization of a counter, specifies a condition to test, and how to change the counter between iterations of the loop.
This document provides an overview of different types of statements and flow control constructs in C++ programming. It discusses sequential, selection, and iteration statements. Selection statements covered include if, if-else, switch, and ternary operator. Iteration statements discussed are for, while, do-while, and nested loops. Jump statements like break, continue, goto, and exit function are also summarized. Examples are provided for most constructs to illustrate their usage.
Programming in java - Concepts- Operators- Control statements-ExpressionsLovelitJose
Control statements in Java include selection statements like if/else and switch statements for decision making, iteration statements like while, do-while and for loops for repetitive execution, and jump statements like break, continue and return to transfer program control flow. Selection statements evaluate certain code blocks conditionally, iteration statements repeatedly evaluate code for a set number of times, and jump statements abruptly end loops or methods.
Control statements allow altering the sequential flow of program execution. There are three main types of control statements in C: conditional statements like if-else that allow branching based on boolean conditions, loop statements like while and for that repeat execution of a block of code a specified number of times, and switch statements that choose among multiple code blocks to execute based on a variable's value. Well-structured programs use control statements to make decisions and repeat tasks to process data efficiently.
The document discusses various control statements in C programming including selection statements like if, if-else, switch and iteration statements like for, while, do-while. It explains how to use these statements to control program flow through conditional execution and selection. Some key concepts covered include nested if statements, the dangling else problem, switch vs if-else statements, testing equality in loops, and using break, continue and goto statements. The document also provides examples of using control statements to find the largest of three numbers and calculate a factorial.
The document discusses various control statements in C programming including selection statements like if, if-else, switch and iteration statements like for, while, do-while. It explains how to use these statements to control program flow through conditional execution and selection. Some key concepts covered include nested if statements, the dangling else problem, switch vs if-else statements, testing floating point equality in loops, and using break and continue statements. The document also provides examples of various control structures like if-else ladder, nested loops and using goto statements.
Selection Statements
Using if and if...else
Nested if Statements
Using switch Statements
Conditional Operator
Repetition Statements
Looping: while, do, and for
Nested loops
Using break and continue
The document discusses different types of loops in C#, including for, while, and do-while loops. It provides examples and explanations of how each loop works. The key types of loops are:
- For loops, which allow initialization of a counter variable, a condition to test each iteration, and an increment/decrement portion.
- While loops, which test a condition and run the code block if true, then re-test the condition.
- Do-while loops, which run the code block first before checking the condition, so the code runs at least once.
Break and continue statements can alter normal loop flow by breaking out of the entire loop or skipping to the next iteration. Lo
This document provides an overview of program control structures in C++ including conditional statements like if/else and switch statements as well as loops like for, while, and do-while. It explains the syntax and usage of each structure with examples. Key points covered include conditional branching, nested control structures, the break and continue keywords, whitespace and comments. The document emphasizes best practices for indentation and formatting source code for readability. It concludes with notes on maintaining a log book of programming work for grading purposes.
2. Control structures with for while and do while.pptManojKhadilkar1
This document introduces various control flow statements in C programming including decision control statements like if, if-else, else-if ladder and switch statements. It also covers loop control statements like while, do-while and for loops. It provides the syntax and examples of using each statement. Key points covered include using break, continue and goto to alter normal program flow, and the exit() function to terminate a program.
This document discusses programming fundamentals and control structures in C++. It covers three main control structures: sequences which execute statements sequentially, repetition (looping) which repeats statements while a condition is met, and selection (branching) which executes instructions depending on conditions. Specific structures covered include if/else, switch, while, do-while, for, and nested loops. Control flow and how these structures direct a program's execution is also explained.
This document discusses different types of program control statements in C++. It covers selection statements like if-else and switch that allow conditional execution of code. It also covers iteration statements like for, while, and do-while loops that allow repetitive execution of code. Additionally, it discusses jump statements like break, continue, goto, and return that allow changing the normal sequential flow of code execution. The document provides syntax and examples to explain how each of these statement types work.
This document discusses control flow statements in C programming language. It describes if, switch, while, do-while, for statements that allow conditional execution and looping. Specific examples are provided to illustrate if/else, while, for loops. Additional features of for loops like initializing multiple variables, omitting sections, and nesting loops are covered. The break and continue statements are also explained for jumping out or skipping parts of a loop.
Mca i pic u-3 handling input output and control statementsRai University
The document discusses various control statements in C programming language including if-else statements, switch statements, loops (while, do-while, for loops), and jump statements like break, continue, goto. It provides examples of each statement type and explains their usage and flow. Key control statements covered are if-else, switch, while, do-while, for loops, and how to exit or continue within loops using break, continue and goto statements.
Diploma ii cfpc u-3 handling input output and control statementsRai University
This document discusses control statements and looping in the C programming language. It covers if-else statements, switch statements, the ternary operator, goto statements, while loops, do-while loops, for loops, and nested loops. It provides examples of each construct and describes how they control program flow. Jump statements like break and continue are also covered, allowing programs to exit or skip parts of loops.
Fundamental of Information Technology - UNIT 8Shipra Swati
This document discusses different types of control structures in C programming including sequence control, selection/decision control, case control, and repetition/loop control. It provides examples of if, if-else, switch, for, and while loops. The if statement and if-else statement are used for decision making and branching based on a condition being true or false. Switch statements provide an alternative for nested if-else statements. Loops like for and while are used to repeat a block of code until a condition is met. Examples are given to calculate the sum of natural numbers using for and while loops.
The document discusses control structures in C programming, including conditional statements and loops.
It describes the if statement and if-else statement, which allow conditional execution of code based on boolean expressions. It also covers the switch statement for selecting between multiple code blocks based on an integral expression.
The document also discusses three loop structures in C - while, for, and do-while loops. The while and for loops repeat code while/for a given condition is true. The do-while loop executes code once before checking the condition. Increment/decrement operators are commonly used to update loop counters in for loops.
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSIJNSA Journal
The smart irrigation system represents an innovative approach to optimize water usage in agricultural and landscaping practices. The integration of cutting-edge technologies, including sensors, actuators, and data analysis, empowers this system to provide accurate monitoring and control of irrigation processes by leveraging real-time environmental conditions. The main objective of a smart irrigation system is to optimize water efficiency, minimize expenses, and foster the adoption of sustainable water management methods. This paper conducts a systematic risk assessment by exploring the key components/assets and their functionalities in the smart irrigation system. The crucial role of sensors in gathering data on soil moisture, weather patterns, and plant well-being is emphasized in this system. These sensors enable intelligent decision-making in irrigation scheduling and water distribution, leading to enhanced water efficiency and sustainable water management practices. Actuators enable automated control of irrigation devices, ensuring precise and targeted water delivery to plants. Additionally, the paper addresses the potential threat and vulnerabilities associated with smart irrigation systems. It discusses limitations of the system, such as power constraints and computational capabilities, and calculates the potential security risks. The paper suggests possible risk treatment methods for effective secure system operation. In conclusion, the paper emphasizes the significant benefits of implementing smart irrigation systems, including improved water conservation, increased crop yield, and reduced environmental impact. Additionally, based on the security analysis conducted, the paper recommends the implementation of countermeasures and security approaches to address vulnerabilities and ensure the integrity and reliability of the system. By incorporating these measures, smart irrigation technology can revolutionize water management practices in agriculture, promoting sustainability, resource efficiency, and safeguarding against potential security threats.
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...University of Maribor
Slides from talk presenting:
Aleš Zamuda: Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapter and Networking.
Presentation at IcETRAN 2024 session:
"Inter-Society Networking Panel GRSS/MTT-S/CIS
Panel Session: Promoting Connection and Cooperation"
IEEE Slovenia GRSS
IEEE Serbia and Montenegro MTT-S
IEEE Slovenia CIS
11TH INTERNATIONAL CONFERENCE ON ELECTRICAL, ELECTRONIC AND COMPUTING ENGINEERING
3-6 June 2024, Niš, Serbia
The document discusses different types of loops in Java including while, do-while, and for loops. It explains the syntax and flow of each loop type and provides examples of how and when to use each loop. The document also covers break and continue statements that can be used inside loops to control flow, as well as increment and decrement operators.
This document summarizes different types of loops in C programming: for loops, while loops, and do-while loops. It explains the basic structure of each loop type, including where the initialization, test condition, and updating of the loop variable occurs. It also distinguishes between entry controlled loops (for and while) and exit controlled loops (do-while). Additional loop concepts covered include break and continue statements, and sentinel controlled loops. Examples are provided to illustrate usage of each loop type.
The document discusses the different types of loops in C language: while loop, do-while loop, and for loop. It provides the syntax and an example of each loop. The while loop checks the condition first and repeats the block of code as long as the condition is true. The do-while loop ensures the block of code executes at least once before checking the condition. The for loop allows initialization of a counter, specifies a condition to test, and how to change the counter between iterations of the loop.
This document provides an overview of different types of statements and flow control constructs in C++ programming. It discusses sequential, selection, and iteration statements. Selection statements covered include if, if-else, switch, and ternary operator. Iteration statements discussed are for, while, do-while, and nested loops. Jump statements like break, continue, goto, and exit function are also summarized. Examples are provided for most constructs to illustrate their usage.
Programming in java - Concepts- Operators- Control statements-ExpressionsLovelitJose
Control statements in Java include selection statements like if/else and switch statements for decision making, iteration statements like while, do-while and for loops for repetitive execution, and jump statements like break, continue and return to transfer program control flow. Selection statements evaluate certain code blocks conditionally, iteration statements repeatedly evaluate code for a set number of times, and jump statements abruptly end loops or methods.
Control statements allow altering the sequential flow of program execution. There are three main types of control statements in C: conditional statements like if-else that allow branching based on boolean conditions, loop statements like while and for that repeat execution of a block of code a specified number of times, and switch statements that choose among multiple code blocks to execute based on a variable's value. Well-structured programs use control statements to make decisions and repeat tasks to process data efficiently.
The document discusses various control statements in C programming including selection statements like if, if-else, switch and iteration statements like for, while, do-while. It explains how to use these statements to control program flow through conditional execution and selection. Some key concepts covered include nested if statements, the dangling else problem, switch vs if-else statements, testing equality in loops, and using break, continue and goto statements. The document also provides examples of using control statements to find the largest of three numbers and calculate a factorial.
The document discusses various control statements in C programming including selection statements like if, if-else, switch and iteration statements like for, while, do-while. It explains how to use these statements to control program flow through conditional execution and selection. Some key concepts covered include nested if statements, the dangling else problem, switch vs if-else statements, testing floating point equality in loops, and using break and continue statements. The document also provides examples of various control structures like if-else ladder, nested loops and using goto statements.
Selection Statements
Using if and if...else
Nested if Statements
Using switch Statements
Conditional Operator
Repetition Statements
Looping: while, do, and for
Nested loops
Using break and continue
The document discusses different types of loops in C#, including for, while, and do-while loops. It provides examples and explanations of how each loop works. The key types of loops are:
- For loops, which allow initialization of a counter variable, a condition to test each iteration, and an increment/decrement portion.
- While loops, which test a condition and run the code block if true, then re-test the condition.
- Do-while loops, which run the code block first before checking the condition, so the code runs at least once.
Break and continue statements can alter normal loop flow by breaking out of the entire loop or skipping to the next iteration. Lo
This document provides an overview of program control structures in C++ including conditional statements like if/else and switch statements as well as loops like for, while, and do-while. It explains the syntax and usage of each structure with examples. Key points covered include conditional branching, nested control structures, the break and continue keywords, whitespace and comments. The document emphasizes best practices for indentation and formatting source code for readability. It concludes with notes on maintaining a log book of programming work for grading purposes.
2. Control structures with for while and do while.pptManojKhadilkar1
This document introduces various control flow statements in C programming including decision control statements like if, if-else, else-if ladder and switch statements. It also covers loop control statements like while, do-while and for loops. It provides the syntax and examples of using each statement. Key points covered include using break, continue and goto to alter normal program flow, and the exit() function to terminate a program.
This document discusses programming fundamentals and control structures in C++. It covers three main control structures: sequences which execute statements sequentially, repetition (looping) which repeats statements while a condition is met, and selection (branching) which executes instructions depending on conditions. Specific structures covered include if/else, switch, while, do-while, for, and nested loops. Control flow and how these structures direct a program's execution is also explained.
This document discusses different types of program control statements in C++. It covers selection statements like if-else and switch that allow conditional execution of code. It also covers iteration statements like for, while, and do-while loops that allow repetitive execution of code. Additionally, it discusses jump statements like break, continue, goto, and return that allow changing the normal sequential flow of code execution. The document provides syntax and examples to explain how each of these statement types work.
This document discusses control flow statements in C programming language. It describes if, switch, while, do-while, for statements that allow conditional execution and looping. Specific examples are provided to illustrate if/else, while, for loops. Additional features of for loops like initializing multiple variables, omitting sections, and nesting loops are covered. The break and continue statements are also explained for jumping out or skipping parts of a loop.
Mca i pic u-3 handling input output and control statementsRai University
The document discusses various control statements in C programming language including if-else statements, switch statements, loops (while, do-while, for loops), and jump statements like break, continue, goto. It provides examples of each statement type and explains their usage and flow. Key control statements covered are if-else, switch, while, do-while, for loops, and how to exit or continue within loops using break, continue and goto statements.
Diploma ii cfpc u-3 handling input output and control statementsRai University
This document discusses control statements and looping in the C programming language. It covers if-else statements, switch statements, the ternary operator, goto statements, while loops, do-while loops, for loops, and nested loops. It provides examples of each construct and describes how they control program flow. Jump statements like break and continue are also covered, allowing programs to exit or skip parts of loops.
Fundamental of Information Technology - UNIT 8Shipra Swati
This document discusses different types of control structures in C programming including sequence control, selection/decision control, case control, and repetition/loop control. It provides examples of if, if-else, switch, for, and while loops. The if statement and if-else statement are used for decision making and branching based on a condition being true or false. Switch statements provide an alternative for nested if-else statements. Loops like for and while are used to repeat a block of code until a condition is met. Examples are given to calculate the sum of natural numbers using for and while loops.
The document discusses control structures in C programming, including conditional statements and loops.
It describes the if statement and if-else statement, which allow conditional execution of code based on boolean expressions. It also covers the switch statement for selecting between multiple code blocks based on an integral expression.
The document also discusses three loop structures in C - while, for, and do-while loops. The while and for loops repeat code while/for a given condition is true. The do-while loop executes code once before checking the condition. Increment/decrement operators are commonly used to update loop counters in for loops.
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSIJNSA Journal
The smart irrigation system represents an innovative approach to optimize water usage in agricultural and landscaping practices. The integration of cutting-edge technologies, including sensors, actuators, and data analysis, empowers this system to provide accurate monitoring and control of irrigation processes by leveraging real-time environmental conditions. The main objective of a smart irrigation system is to optimize water efficiency, minimize expenses, and foster the adoption of sustainable water management methods. This paper conducts a systematic risk assessment by exploring the key components/assets and their functionalities in the smart irrigation system. The crucial role of sensors in gathering data on soil moisture, weather patterns, and plant well-being is emphasized in this system. These sensors enable intelligent decision-making in irrigation scheduling and water distribution, leading to enhanced water efficiency and sustainable water management practices. Actuators enable automated control of irrigation devices, ensuring precise and targeted water delivery to plants. Additionally, the paper addresses the potential threat and vulnerabilities associated with smart irrigation systems. It discusses limitations of the system, such as power constraints and computational capabilities, and calculates the potential security risks. The paper suggests possible risk treatment methods for effective secure system operation. In conclusion, the paper emphasizes the significant benefits of implementing smart irrigation systems, including improved water conservation, increased crop yield, and reduced environmental impact. Additionally, based on the security analysis conducted, the paper recommends the implementation of countermeasures and security approaches to address vulnerabilities and ensure the integrity and reliability of the system. By incorporating these measures, smart irrigation technology can revolutionize water management practices in agriculture, promoting sustainability, resource efficiency, and safeguarding against potential security threats.
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...University of Maribor
Slides from talk presenting:
Aleš Zamuda: Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapter and Networking.
Presentation at IcETRAN 2024 session:
"Inter-Society Networking Panel GRSS/MTT-S/CIS
Panel Session: Promoting Connection and Cooperation"
IEEE Slovenia GRSS
IEEE Serbia and Montenegro MTT-S
IEEE Slovenia CIS
11TH INTERNATIONAL CONFERENCE ON ELECTRICAL, ELECTRONIC AND COMPUTING ENGINEERING
3-6 June 2024, Niš, Serbia
International Conference on NLP, Artificial Intelligence, Machine Learning an...gerogepatton
International Conference on NLP, Artificial Intelligence, Machine Learning and Applications (NLAIM 2024) offers a premier global platform for exchanging insights and findings in the theory, methodology, and applications of NLP, Artificial Intelligence, Machine Learning, and their applications. The conference seeks substantial contributions across all key domains of NLP, Artificial Intelligence, Machine Learning, and their practical applications, aiming to foster both theoretical advancements and real-world implementations. With a focus on facilitating collaboration between researchers and practitioners from academia and industry, the conference serves as a nexus for sharing the latest developments in the field.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsVictor Morales
K8sGPT is a tool that analyzes and diagnoses Kubernetes clusters. This presentation was used to share the requirements and dependencies to deploy K8sGPT in a local environment.
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
A review on techniques and modelling methodologies used for checking electrom...nooriasukmaningtyas
The proper function of the integrated circuit (IC) in an inhibiting electromagnetic environment has always been a serious concern throughout the decades of revolution in the world of electronics, from disjunct devices to today’s integrated circuit technology, where billions of transistors are combined on a single chip. The automotive industry and smart vehicles in particular, are confronting design issues such as being prone to electromagnetic interference (EMI). Electronic control devices calculate incorrect outputs because of EMI and sensors give misleading values which can prove fatal in case of automotives. In this paper, the authors have non exhaustively tried to review research work concerned with the investigation of EMI in ICs and prediction of this EMI using various modelling methodologies and measurement setups.
Introduction- e - waste – definition - sources of e-waste– hazardous substances in e-waste - effects of e-waste on environment and human health- need for e-waste management– e-waste handling rules - waste minimization techniques for managing e-waste – recycling of e-waste - disposal treatment methods of e- waste – mechanism of extraction of precious metal from leaching solution-global Scenario of E-waste – E-waste in India- case studies.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
Recycled Concrete Aggregate in Construction Part II
UNIT 2 PPT.pdf
1. 1
U19CS101 – PROBLEM SOLVIG USING C
I- SEM
Presented By:
C.Ganesh., M.E., (Ph.D)
Assistant Professor
Department of ECE
Sri Eshwar college of Engineering
2. 2
❑ Problem solving using Conditional or Selection or
Branching Statements:
❑ Structure of if, if-else, else-if ladder, nested-if, switch
constructs - Looping constructs: Structure of for, while, do-
while constructs, usage of break, return, goto and continue
keywords
UNIT II –
CONDITIONAL STATEMENTS AND LOOPING
CONSTRUCTS
3. 1. if Statement
3
❑ The conditional branching statements help to jump from one part
of the program to another depending on whether a particular
condition is satisfied or not.
❑ The decision control statements include
❑ Simple if
❑ if-else
❑ if-else-if-ladder
❑ nested-if
❑ switch case
4. if Statement-Example
4
❑ The if statement is the simplest form of selection statement
that frequently used in decision making.
❑ The syntax for simple if statement is,
5. if - Flowchart
5
The ‘statement-block’ may be a single statement or a group of
statements. If the test expression is true, the statement-block will be
executed; otherwise the statement-block will be skipped and the
execution will jump to the statement-x.
7. 2. The if-else statement
7
❑ It is observed that if statement executed only when the condition
following if is true. It does nothing when the condition is false.
❑ The if-else statement take care of true as well as false conditions.
❑ It has two blocks.
❑ One block is for if and it is executed when the condition is true.
❑ The other block is for else block and it is executed when the condition
is false.
❑ The else statement cannot be used without if.
8. if-else -Syntax
8
❑ If the test expression is true, then the true-block statement(s),
immediately following the if statements are executed; otherwise, the
false-block statement(s) are executed.
❑ In either case, either true-block or false-block will be executed, not
both
11. 3. Nested if-else
11
When a series of decisions are involved, we may have to use more than
one if...else statement in nested form as shown below:
❑ If the condition-1 is false, the statement-3 will be executed; otherwise it
continues to perform the second test.
❑ If the condition-2 is true, the statement-1 will be evaluated; otherwise
the statement-2 will be evaluated and then the control is transferred to the
statement-x.
13. 3. Nested if-else - Example
13
A commercial bank has introduced an incentive policy of giving bonus to all its deposit
holders. The policy is as follows: A bonus of 2 per cent of the balance held on 31st
December is given to every one, irrespective of their balance, and 5 per cent is given to
female account holders if their balance is more than Rs. 5000. This logic can be coded
as follows:
14. Dangling Else problem (Nested if-else)
14
❑ Once we start nesting if-else statements, we may encounter a classic
problem known as the dangling else.
❑ This problem is created when there is no matching else for every
if.
❑ The solution to this problem is to follow the simple rule: Always
pair an else to the most recent unpaired if in the current block
❑ Consider the example shown below from the code alignment, we
conclude that the programmer intended the else statement to be
paired with the first if.
❑ However, the compiler will pair it with the second if.
15. 4. The if-else-if statement
15
❑ Sometimes we wish to make a multi-way decision based on several
conditions.
❑ The most general way of doing this is by using the else if variant on the if
statement.
❑ This works by cascading several comparisons.
❑ As soon as one of these gives a true result, the following statement or
block is executed and no further comparisons are performed.
❑ If none of the condition is true, the final else is executed.
❑ The final else statement is optional.
20. 5.Switch statement
20
❑ The switch() case statement is like the if statement that allows us to
make a decision from a number of choices.
❑ The switch statement evaluates the expression and then looks for its
value among case constants.
❑ If the value matches with a case constant, this particular case
statement is executed.
❑ If not, the default is executed.
21. Switch statement- Syntax
21
The expression is an integer
expression or characters. Value-1,
value-2 ..... are constants or
constant
expressions (evaluable to an
integral constant) and are known as
case labels. Each of these values
should be unique within a switch
statement. .... are statement lists and
may contain
zero or more statements. There is
no need to put braces around these
blocks. Note that labels
end with a colon (:).
24. Looping (or) Iterative statements
24
❑ Loops are used to execute a group of statements (Or) block of
statements repeatedly until some condition is satisfied.
25. Looping - Steps
25
1. Initialization of counter
2. Testing condition
3. Execution of loop body (group of statements)
4. Modification (Increment/Decrement) of counter value
26. 1.While Loop
26
❑ The while is an entry-controlled loop statement. The test-
condition is evaluated and if the condition is true then the body of
the loop is executed.
❑ After the execution of the body, the test condition is once again
evaluated and if it is true, the body is executed once again.
❑ This process of repeated execution of the body continues until the
test condition finally becomes false and the control is transferred
out of the loop.
❑ On exit, the program continues with the statement immediately
after the body of the loop.
27. 1.While Loop (Pre-test/Entry controlled loop)
27
❑ The body of the loop may have one or more statements.
❑ The braces are needed only if the body contains two or more
statements.
❑ However, it is a good practice to use braces even if the body has only
one statement
❑ Steps:
1. Initialization of the counter variable.
2. Condition is checked. If condition is ‘True’
3. Body of the loop is executed
4. Modification (Increment or Decrement) of counter.
5. The steps 3,4 and 5 are executed
6. If condition is ‘False’, then control comes out of the loop and the
statements following the while loop are executed.
29. While Loop - Example
29
Ex:1 Printing 1 to 5 numbers using while loop
#include<stdio.h>
int main()
{
int i=1; # counter initialization
while (i<=5) // condition checking
{
printf(“n%d”,i); // body of the while loop
i++; // incrementing counter
}
return 0;
}
30. While Loop - Example
30
Ex:2 Printing 5 to 1 numbers using while loop
#include<stdio.h>
int main()
{
int i=5; # counter initialization
while (i>=0) // condition checking
{
printf(“n%d”,i); // body of the while loop
i--; // incrementing counter
}
return 0;
}
31. While Loop - Example
31
Ex:3 Printing sum of ‘n’ natural numbers using while loop
#include<stdio.h>
int main()
{
int i=1; // counter initialization
int sum=0,n;
scanf(“%d”,&n);
while (i<=n) // condition checking
{
sum=sum+i; // body of the while loop
i++; // incrementing counter
}
printf(“The sum of first %d numbers is =%d”,n,sum);
printf(“The average value is %d”,sum/n);
return 0;
}
32. 2.Do While Loop (exit controlled/post-test)
32
❑ The do-while loop is an exit controlled loop because the test condition
is evaluated at the end of the loop.
❑ The do-while loop will execute at least one time even if the condition
is false initially.
❑ Note that the test condition is enclosed in parenthesis and followed by
a semicolon.
37. While and Do While Loop - Comparison
37
While Do-while
1.Entry controlled or pre-test loop 1,Exit controlled or post-test
Loop
2. Should not be terminated with ; 2. Terminated with ;
3. If we use a single statement in
loop body, it does not need braces
for enclosing it
3. We use braces even if the loop
body contains a single statement.
4. If condition is failed at the first
time, loop body is not executed
4. Even if the condition is false for
the first time, loop is executed at
least once.
38. 3.For Loop
38
❑ For loop is used to execute a set of statements repeatedly until a
particular condition is satisfied.
❑ It is a pre-test loop and it is used when the number of iterations of the
loop is known before the loop is entered.
The head of the loop consists of three parts.
▪ Initialization expression
▪ Test expression
▪ Update expression separated by semicolon.
Execution of for loop
1. It first evaluates the initialization code.
2. Then it checks the condition expression.
3. If it is true, it executes the for-loop body.
4. Then it evaluates the increment/decrement condition and again follows
from step 2.
5. When condition expression becomes false, it exits the loop.
39. for Loop - Syntax
39
❑ This for loop is executed 10 times and prints the digits 0 to 9 in one
line. The three sections enclosed within parentheses must be
separated by semicolons.
❑ Note that there is no semicolon at the end of the increment section,
x = x+1.
45. Nested for-loop
45
❑ C allows its users to have nested loop, i.e., loops that can be placed
inside other loops.
❑ Although this feature will work with any loop like while, do-while
and for, it is most commonly used in for loop because this is easier to
control.
51. The break statement
51
❑ The keyword break allows the programmers to terminate the loop.
❑ The break skips from the loop or block in which it is defined.
❑ The control automatically goes to the first statement after the loop or
block.
❑ The break statement is widely used with for loop, while loop, and do while
loop.
❑ In switch statement if the break statement is missing then every case
from the matched case label till the end of the switch, including the
default, is executed.
54. The continue statement
54
❑ The continue statement is exactly opposite to break.
❑ The continue statement is used to continue next iteration of
loop statement.
❑ When it occurs in the loop it does not terminate but it skip the
statement after this statement.
58. THE goto STATEMENT
58
❑ This statement does not require any condition
❑ This statement passes control anywhere in the program, that is,
control is transferred to another part of the program without
testing any condition.
❑ The user has to define goto statement as follows.
❑ Where, the label name must start with any character.
❑ Label is the position where the condition is to be transferred.