This lab report discusses C control flow structures like for, while, do-while loops as well as break and continue statements. It includes examples of each type of loop and how they work. Homework problems are assigned asking the student to write programs to calculate the sum of odd and even numbers up to a given range, and to find the factorial of a number. The report concludes that learning about C control flow and jump statements is important for programming.
In this lecture we discuss more about programming in MATLAB. One main section in programming is flow control. There are many flow control commands in MATLAB. In this lecture we discuss the conditional flow control commands. Conditional statements are commands that allows MATLAB to decide whether or not to execute some code that follows the statement
Conditional statements use relational operators like ==,~=,>,< (Note that are all scalar tests)
Iterative control structures, looping, types of loops, loop workingNeeru Mittal
Introduction to looping, for loop. while loop, do loop jump statements, entry controlled vs exit controlled loop, algorithm and flowchart of loops, factorial of a number
In this lecture we discuss more about programming in MATLAB. One main section in programming is flow control. There are many flow control commands in MATLAB. In this lecture we discuss the conditional flow control commands. Conditional statements are commands that allows MATLAB to decide whether or not to execute some code that follows the statement
Conditional statements use relational operators like ==,~=,>,< (Note that are all scalar tests)
Iterative control structures, looping, types of loops, loop workingNeeru Mittal
Introduction to looping, for loop. while loop, do loop jump statements, entry controlled vs exit controlled loop, algorithm and flowchart of loops, factorial of a number
C Programming Language is the most popular computer language and most used programming language till now. It is very simple and elegant language. This lecture series will give you basic concepts of structured programming language with C.
By the end of this chapter, students will be able to:
Explain the operation of if, else if and else
Explain the operation of relational and logical operators
Analyze programs that use branching
Write programs that use branching to solve problems
Infix to Postfix Conversion Using StackSoumen Santra
Infix to Postfix Conversion Using Stack is one of the most significant example of application of Stack which is an ADT (Abstract Data Type) based on LIFO concept.
C Programming Language is the most popular computer language and most used programming language till now. It is very simple and elegant language. This lecture series will give you basic concepts of structured programming language with C.
By the end of this chapter, students will be able to:
Explain the operation of if, else if and else
Explain the operation of relational and logical operators
Analyze programs that use branching
Write programs that use branching to solve problems
Infix to Postfix Conversion Using StackSoumen Santra
Infix to Postfix Conversion Using Stack is one of the most significant example of application of Stack which is an ADT (Abstract Data Type) based on LIFO concept.
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested LoopPriyom Majumder
This file is based on the loops that could be used in C Programming. These are explained with some examples and sample programmings and screen shots.
NOTE: The software used in this programming is Notepad++ and the programs are compiled and run through gcc compiler using command prompt.
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.
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.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
1. Lab Report
Course ID: TE-3702
Course Title:-Computer Application and Programming
(Sessional)
Experiment No. 04
Name:-Introduction to C control flow (for, while, do while,
break and continue).
Submitted by
Name :
ID :
Year and Semester :
Session :
Department :
Mahbubay Rabbani
175035
3/1
2018-19
Textile Engineering
Submitted to
Khawja Imran Masud
Lecturer
Department of CSE
Dhaka University of Engineering & Technology (DUET), Gazipur
2. Introduction:-
In programming, the process of execution of the same program is over
and over is called looping. A loop is used to repeat a statement until the
specified condition is satisfied. C programming has three types of
loops:-
1. for loop.
2. while loop.
3. do while loop.
Jump Statements in C
continue.
break.
goto.
Objectives:-
To know about for loop.
To know about while loop.
To know about do while loop.
To know about break statement.
To know about continue statement.
3. for loop:-
It works with 3 steps:-
In the 1st
step initialization happens and the variable gets initialized.
In the 2nd
step the condition is checked. If the condition is true then the
C statements inside the body of for loop is executed, if the condition is
false then the for loop gets terminated.
In 3rd
step after successful execution of statements inside the body of
loop, the variable is incremented or decremented and again check the
condition till termination.
5. while loop:-
The variable is initialized with value and then it has been tested for the
condition.
If the condition is true then the statements inside the body of while loop
are executed else the loop is terminated.
The value is incremented using increment ++ operator then it has been
tested again for the loop condition.
Example
#include <stdio.h>
int main()
{
int i=1;
while (i<=10)
{
printf("%dn",i);
i++;
}
}
7. Infinite while loop:- Inside the body of loop if the condition will be true
always then the loop never terminate.
Example
#include <stdio.h>
int main()
{
int i = 1;
while (i >=1)
{
printf("%d", i);
i++;
}
return 0;
}
9. do while loop:-
do while loop is similar to while loop but it executes the statements
inside the body of do-while before checking the condition.
On the other hand in the while loop, first the condition is checked and
then the statements are executed.
So if a condition is false at the first place then the do while would
execute once but the while loop would not execute.
Example
#include <stdio.h>
int main()
{
int mim=0;
do
{
printf("mim is=%dn",mim);
mim++;
}while (mim<=3);
return 0;
}
11. Difference between between while and do while loop:-
Program executed for do while program not executed for while
12. continue statement:-
The continue statement is used inside loops.
When the condition is true under the continue statement then it skips the
print of statement and again go to the condition check for the next.
Example
#include <stdio.h>
int main()
{
int i;
for(i=0; i<=8; i++)
{
if (i==4)
{
continue;
}
printf("%dn",i);
}
return 0;
}
13. Output
As here i=4 is true for continue statement and so skip it for
execution that’s why it is not printed.
14. break statement:-
It is used to terminate the loop instantly.
When the condition is true under the break statement then it terminates
the print of statement.
Example
#include <stdio.h>
int main()
{
int i;
for (i=1;i<=10;i++)
{
printf("%dn",i);
if(i==3)
{
break;
}
}
return 0;
}
15. Output
As the condition i=3 is true under the break statement and that’s
why not printed up to 10 here and the condition is break after
printed 3
16. Home task:-
1. Write a proram and display the output
1+3+5+7+----+n
2+4+6+8+----+n
Ans:- (Summation of odd numbers)
#include<stdio.h>
int main()
{
int i,n,sum=0;
printf("enter the range of numbers=");
scanf("%d",&n);
for(i=1; i<=n; i=i+2)
{
sum=sum+i;
}
printf("the result of all odd numbers=%d",sum);
return 0;
}
18. Ans:- (Summation of even numbers)
#include<stdio.h>
int main()
{
int i,n,sum=0;
printf("enter the range of numbers=");
scanf("%d",&n);
for(i=2; i<=n; i=i+2)
{
sum=sum+i;
}
printf("the result of all even numbers=%d",sum);
return 0;
}
20. 2. Write a c program that find the factorial of a number.
Ans:-
#include<stdio.h>
int main()
{
int i,n,f=1;
printf("enter the range of number=");
scanf("%d",&n);
for(i=1; i<=n; i++)
{
f=f*i;
}
printf("the factorial result of the number=%d",f);
return 0;
}
22. Conclusion:- From this experiment we have learn about C control
flow and jump statements and also learn their working principle which is
very important for programming. I think it will help me a lot in practical
life