Skip to player
Skip to main content
Skip to footer
Search
Connect
Watch fullscreen
Like
Comments
Bookmark
Share
Add to Playlist
Report
Learn Programming Technique C to Master Skills - Third Program of Loop ( Flow Chart)
Tutorials Arena
Follow
10/17/2024
Category
📚
Learning
Transcript
Display full video transcript
00:00
Hello everyone, I am going to explain a program of display sum of square of first three odd
00:09
numbers.
00:10
So we know that the square of first three odd numbers are 1, 9 and 25, when we sum it
00:20
and we add these numbers 1, 9 and 25 will get what 35.
00:27
So let us understand this program in the flowchart, I have taken variables od for the odd number,
00:34
i to count the odd numbers, sq for the square of number and s to get the sum.
00:44
I have initialized the values, I have initialized the value of od that is 1, I have initialized
00:49
the value of i that is 1 and value of s that is 0.
00:56
Now I need the sum of first three odd numbers, that's why this loop is going to carry on
01:01
for three times, let us do the dry run, the value inside i is 1, 1 less than 3, yes the
01:08
condition is true, it will come to the yes part, what is inside od, it is 1, so 1 into
01:15
1, so 1 is going to store inside s, in s it is 0, 1 is added to it, so 0 plus 1, new value
01:23
inside s it is 1, then what is inside od, it is 1, 2 is going to add with it, so the
01:31
new value of od it will be what 3.
01:35
I have to carry on the loop, so i equal to i plus 1, so 1 plus 1 that is what 2, so now
01:41
inside od it is 3 and inside i it is 2, so now the loop will carry on, 2 less than 3,
01:48
the condition is true, now what is inside od, it is 3, what 3 into 3, 9 is going to
01:55
store inside sq, inside sum the value is what 1, inside s it is 1, 9 is going to add with
02:04
it, so 1 plus 9 that is now inside s it is what 10, then 3 plus 2 that is what 5 and
02:15
here it will be what 2 plus 1, 3, again the loop will carry on, 3 equal to 3 the condition
02:22
is true.
02:23
Now 5 into 5 that is 25, so 25 is going to store inside sq, now what is equation, what
02:31
is the value inside s, it is now 10, 10 plus 25 as the value inside sq is what 25, 10 plus
02:41
25 inside s it is now 35.
02:46
Now I will come to this equation 5 plus 2, 7 and here 3 plus 1, 4 the loop will carry
02:54
on, 4 less than 3 the condition is false, so once the loop will complete, once the loop
03:00
will complete and when it get terminated after that we have to display the resulted value,
03:07
so what is inside s, it is 35, the resulted value is what 35, that is going to print and
03:17
then what is stop, so I hope you understand, I am going to implement the program in C in
03:24
my next video.
Recommended
3:52
|
Up next
Learn Programming Technique C to Master Skills - Second Program of Loop (Flow Chart)
Tutorials Arena
10/17/2024
4:01
Learn Programming Technique C to Master Skills - Fourth Program of Loop ( Flow Chart )
Tutorials Arena
10/13/2024
3:51
Learn Programming Technique C to Master Skills - First Program of Loop (Flowchart)
Tutorials Arena
10/13/2024
4:57
Learn Programming Technique C to Master Skills - Loop With If Statement Program ( Flow Chart )
Tutorials Arena
10/13/2024
5:02
Learn Programming Technique C to Master Skills - Third Program of Loop
Tutorials Arena
10/17/2024
3:51
Learn Programming Technique C to Master Skills - First Program of Loop (For Loop)
Tutorials Arena
10/13/2024
5:29
Learn Programming Technique C to Master Skills - Continuous If Program (Flow Chart)
Tutorials Arena
10/8/2024
4:03
Learn Programming Technique C to Master Skills - Second Program of Loop ( For Loop )
Tutorials Arena
10/17/2024
4:28
Learn Programming Technique C to Master Skills - Fourth Program of Loop ( For Loop )
Tutorials Arena
10/13/2024
5:33
Learn Programming Technique C to Master Skills - Fourth Program of Loop ( While Loop )
Tutorials Arena
10/13/2024
5:15
Learn Programming Technique C to Master SkillsCharacter String Third Program (Flowchart)
Tutorials Arena
11/19/2024
4:54
Learn Programming Technique C to Master Skills - Single If Statement Program (Flow Chart)
Tutorials Arena
10/12/2024
3:55
Learn Programming Technique C to Master Skills - First Program of Loop (While Loop)
Tutorials Arena
10/13/2024
2:58
Learn Programming Technique C to Master Skills - Nested If Statement Program (Flow Chart)
Tutorials Arena
10/12/2024
8:18
Learn Programming Technique C to Master Skills - Loop Within Loop Program Explanation in Flow chart
Tutorials Arena
10/17/2024
4:07
Learn Programming Technique C to Master Skills - Second Program of Loop (While Loop)
Tutorials Arena
10/17/2024
8:01
Learn Programming Technique C to Master Skills - Loop Within Loop Program
Tutorials Arena
10/17/2024
4:55
Learn Programming Technique C to Master SkillsCharacter String Second Program (Flowchart)
Tutorials Arena
11/19/2024
4:54
Learn Programming Technique C to Master SkillsCharacter String Fifth Program ( Flowchart)
Tutorials Arena
11/19/2024
3:21
Learn Programming Technique C to Master Skills - Third Program - Call by Reference (continue...)
Tutorials Arena
11/8/2024
7:12
Learn Programming Technique C to Master Skills - Third Program (Passing Entire Array in Function)
Tutorials Arena
11/9/2024
3:20
Learn Programming Technique C to Master Skills - Multiple Selection Program (Flow chart)
Tutorials Arena
10/12/2024
9:58
Learn Programming Technique C to Master Skills - Third Program of Array
Tutorials Arena
11/1/2024
2:11
Learn Programming Technique C to Master Skills - Explanation of Second Program in Flowchart
Tutorials Arena
10/8/2024
10:56
Learn Programming Technique C to Master Skills - Loop With If Statement Program
Tutorials Arena
10/13/2024