Skip to player
Skip to main content
Skip to footer
Search
Connect
Watch fullscreen
Like
Bookmark
Share
Add to Playlist
Report
Learn Programming Technique C to Master Skills - Multiple Selection Program
Tutorials Arena
Follow
10/12/2024
Category
š
Learning
Transcript
Display full video transcript
00:00
Hello everyone. I'm Sandeep. I'm Sandeep Thakur. In the last video, I explained about the multiple
00:08
selection. I have explained the program in the flowchart that you have to input the average
00:14
marks and according to the average marks, you have to display the grid. So I explained
00:20
this program in flowchart. Now I'm going to make it in C. Let us see how to do it.
00:29
I will quickly go and open empty file. Save it also in the name of ARGNU5. You can give
00:47
any name to it and save. I started with the hash include. I will use what int main and
01:01
inside it. Here I will use what float avg. I gave a message that is what inputAverageMarks.
01:16
Then I'm going to use what scanf with type specifier %f where the value is going to store
01:27
inside the avg. According to question, I will start using the statement if avg greater than
01:37
equals to what 90, isn't it? It's between 80 to 100. So greater than equals to what 80.
01:54
In that case, what it should display printf slash and what the question says that you have
02:05
to display honors. It should display what here? Honors. At the end what semicolon.
02:24
If the condition get false, so it will come to the else part. Again the condition is going to
02:29
check if avg greater than equals to what the question says. Let us see if it's
02:37
greater than 60 but less than 80. In that case false division.
02:45
So here greater than 60 or equal to 60 and less than 80. In that case,
03:00
what first division. If here also the condition get false, so it will come to the else part.
03:12
If avg greater than equals to I hope so it's 50. Let us see.
03:19
Yes, 50 if it's between 50 to 59 and second division.
03:29
So I will use what printf slash and second division like this and if again come to what I
03:42
will say if avg greater than equals to 40. In that case, printf slash and third division.
03:59
At the last what else and inside it printf fail. If it's less than 40 then fail.
04:16
So I have completed this program. Let us use what I have done zero.
04:22
Okay, save it and click on build. Let us see everything is okay or not.
04:37
I'm going to run it. Suppose here I use what 93.
04:46
There's some problem.
04:52
Let me see what's the problem. I haven't used the ampersand side with the avg.
04:59
That's why let me save it and click on build and run it or let me
05:10
input the value. So it's shown me what honors and suppose here I input the value what 77
05:21
which is between 60 and 80. So what it should display positive vision. I'm putting the values
05:30
according to the question and if here I input what 23 which is very less so it should show me what
05:37
fail. So the value which I am going to input that is going to store inside the avg if I input was
05:46
88. So here the condition gets true. So it's going to display this part. If I input 77
05:53
inside the avg. So here the condition will get false as the 77 greater than 80 the condition
06:01
get false. So it will come to the else part. It will again take decision here 77 greater than 60
06:09
so this part is going to work. I hope you understand how the program works.
06:18
I have written the program and how the conditions are checking
06:22
and how it's checked and gave us the result. Thanks.
Recommended
12:03
|
Up next
Learn Programming Technique C to Master Skills - Selection Sort Program
Tutorials Arena
11/1/2024
9:20
Learn Programming Technique C to Master Skills - Union Program
Tutorials Arena
11/10/2024
3:20
Learn Programming Technique C to Master Skills - Multiple Selection Program (Flow chart)
Tutorials Arena
10/12/2024
12:06
Learn Programming Technique C to Master Skills - Continuous If Statement Program
Tutorials Arena
10/8/2024
5:02
Learn Programming Technique C to Master Skills - Third Program of Loop
Tutorials Arena
10/17/2024
13:34
Learn Programming Technique C to Master Skills - File Handling Program
Tutorials Arena
11/18/2024
8:08
Learn Programming Technique C to MasterĀ Skills - First Program of Function
Tutorials Arena
11/3/2024
4:55
Learn Programming Technique C to Master Skills - Linked List Program
Tutorials Arena
12/2/2024
6:13
Learn Programming Technique C to Master Skills - Union
Tutorials Arena
11/10/2024
5:14
Learn Programming Technique C to Master Skills - Single If Statement Program Explanation
Tutorials Arena
10/12/2024
13:04
Learn Programming Technique C to Master Skills - Double Dimension Array Program
Tutorials Arena
10/20/2024
12:25
Learn Programming Technique C to Master Skills - Call By Reference Program
Tutorials Arena
11/8/2024
4:22
Learn Programming Technique C to Master Skills - Pointer And Arrays Program
Tutorials Arena
11/9/2024
5:27
Learn Programming Technique C to MasterĀ Skills - Sixth Program of Function
Tutorials Arena
11/6/2024
10:56
Learn Programming Technique C to Master Skills - Loop With If Statement Program
Tutorials Arena
10/13/2024
7:56
Learn Programming Technique C to Master Skills - Nested If Statement Program
Tutorials Arena
10/12/2024
10:48
Learn Programming Technique C to MasterĀ Skills - Eighth Program of Function
Tutorials Arena
11/3/2024
4:51
Learn Programming Technique C to MasterĀ Skills - Seventh Program of Function - I
Tutorials Arena
11/3/2024
8:45
Learn Programming Technique C to MasterĀ Skills - Ninth Program of Function
Tutorials Arena
11/3/2024
11:15
Learn Programming Technique C to MasterĀ Skills - Third Program of Function
Tutorials Arena
11/6/2024
11:41
Learn Programming Technique C to Master Skills - Second Program of Array
Tutorials Arena
11/1/2024
9:12
Learn Programming Technique C to Master Skills - Program of Recursion
Tutorials Arena
11/6/2024
3:40
Learn Programming Technique C to Master Skills - Array of Pointer Program
Tutorials Arena
11/9/2024
9:58
Learn Programming Technique C to Master Skills - Third Program of Array
Tutorials Arena
11/1/2024
10:48
Learn Programming Technique C to Master Skills - Structure and Functions Program
Tutorials Arena
11/10/2024