No video

#9: If Else Statements in C | C Programming for Beginners

  Рет қаралды 176,187

Programiz

Programiz

Күн бұрын

Step by step video tutorials to learn C Programming for absolute beginners!
In this video, we will learn about if-else statements in C programming. We will start with the syntax of the if statement and understand the logic. Then we will learn the syntax and logic to use else clause and else if clause with if statement. Finally, by understanding these concepts we will learn to create decision-making programs.
~
Run C Online: www.programiz....
Programs in this video: github.com/pro...
C Tutorial (text-based tutorial): www.programiz....
Watch our videos and revise them with our C App!
Download here for Android: bit.ly/3upaInx
Download here for iOS: apple.co/3EZLtNq
Timestamps:
00:00 Start
04:24 if..else Statement
06:33 else if Statement
11:26 Programming Task
12:32 Quiz
--------------------------------
Find Programiz elsewhere:
Facebook: / programiz
Instagram: / _programiz
LinkedIn: / programiz
Website: www.programiz.com
Twitter: / programiz
#programiz #ifelseinc #learncprogramming #learnc #coding #ctutorial #ccourse #ifelse#elseif #clause #statement #decisionmakingprogram #coding #programming

Пікірлер: 380
@programizstudios
@programizstudios 2 жыл бұрын
🔥Finding it Damn Hard to Understand C Programming? Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT! Try Programiz PRO for Free: bit.ly/master-c-programming
@epeelea1
@epeelea1 Жыл бұрын
Qq
@henryalbrightekenimdeokpos905
@henryalbrightekenimdeokpos905 2 ай бұрын
OKAY THANK YOU
@miarose5382
@miarose5382 2 жыл бұрын
Answer is A : Inside if
@tatchim34
@tatchim34 Жыл бұрын
#include #include //déclaration of variable int main() { double number; printf("enter a double number"); scanf("%lf",&number); if(number>0){ printf("number is positive");} else if(number
@Pop_shorts_369
@Pop_shorts_369 5 ай бұрын
Good job
@yunandaraung2556
@yunandaraung2556 Жыл бұрын
You explain a lot better than my professor from college. Thanks for making things easier!
@marwaneharris4460
@marwaneharris4460 9 ай бұрын
how you did after 11 months?
@Darkness-898
@Darkness-898 2 ай бұрын
PROGRAMIZ QUIZ ANSWER: OPTION(A) Inside if PROGRAMMING TASK GIVEN BY MAM: #include int main() { double num1; printf("Enter a number here: "); scanf("%lf", &num1); if (num1>0){ printf("The number is positive."); } else if (num1==0){ printf("The number is neutral(It is 0)."); } else { printf("The number is negative."); } return 0; }
@erl2nd
@erl2nd Жыл бұрын
Your work is immaculate efficient and you are truly an inspiration. I was not doing well at all at University of but now you have given Me new hope. Thank you!!!
@user-tz1wb2gt7n
@user-tz1wb2gt7n 10 ай бұрын
Mind If I ask how you did ?
@erl2nd
@erl2nd 9 ай бұрын
@@user-tz1wb2gt7n actually wound up in Fall: 1B in the "C" programing and 1C for Calculus dropped psychology, But in Spring '23 all A's for 4classes 12 semester hours the 2nd Semester, I left that University to become a pilot all A's Fall Semester start ground and flight ✈️ labs Jan '24, Thanks for asking! Hope you are well and thank you for being there.
@fountain9886
@fountain9886 Жыл бұрын
i do not know why university Professors are making these easy lessons so much difficult and unbearing, Thank you @programiz
@srpcdgaming
@srpcdgaming Жыл бұрын
The answer is A: inside if Also love your tutorials they're amazing. Keep it up👍
@purpleocean5670
@purpleocean5670 8 ай бұрын
no the answer will be inside else because a%2=1
@MeowwJane
@MeowwJane 2 ай бұрын
@@purpleocean5670but it has the not symbol (!) so it's reversed
@krishsharma162
@krishsharma162 2 жыл бұрын
Ma'am, these lectures are very helpful.
@AlaskarAbdoul
@AlaskarAbdoul Жыл бұрын
/* Can you create a program to check whether a number is positive or negative or 0? To create this program, create a variable named number and assign a double value to it based on the user input. Then using an if statement, check if the number variable is positive or negative or 0. > If number is positive, print"The number is positive" > If number is negative, print"The number is negative" > If number is 0, print "The number is Zero" */ #include int main() { double number; printf("Please write your number and I will let you know if its positive number, zero, or negative number: "); scanf("%lf", &number); if (number < 0){ printf("The number is negative."); } else if (number == 0){ printf("The number is Zero."); } else if (number > 0){ printf("the number is positive."); } return 0; }
@nickjonaz3710
@nickjonaz3710 10 ай бұрын
God bless u ma’am. I love how she explains things very fluently ✍🏾
@henryalbrightekenimdeokpos905
@henryalbrightekenimdeokpos905 2 ай бұрын
Wow, This video Really Helped me in understanding the if/else statements in C. Thank You @programiz for these lessons, God Bless You
@TewodrosBaye1
@TewodrosBaye1 Жыл бұрын
The cutest programming teacher ever. Thanks for making it easier to understand.
@With.h
@With.h Жыл бұрын
Thank youuu it was helpfull int main() { double number; printf("Enter The Number:"); scanf("%lf",&number); if (number>0){ printf("The Number is Positive!"); } else if(number
@neetdiagramacticlearning4173
@neetdiagramacticlearning4173 Жыл бұрын
my life saviour...u made me develop interest in c by taking away my aversion..thanks mam
@alirezaz9896
@alirezaz9896 Жыл бұрын
one of the best c tutorials i have ever seen!!😊😊
@like_a_boss881
@like_a_boss881 Жыл бұрын
answer is A (inside if).....I love your channel by the way....keep it up.!
@aysham.8398
@aysham.8398 Жыл бұрын
I tried to watch different video on the topic but this one is different and concise. Thank you ms!
@UddhavBanik
@UddhavBanik Ай бұрын
Programming task :--- #include int main() { double number; printf("Enter number : "); scanf("%lf",&number); if (number > 0) printf("The number is positive"); else if(number < 0) printf("The number is negative"); else if(number == 0) printf("The number is zero"); return 0; }
@emmydee408
@emmydee408 Жыл бұрын
Thank you so much for this video ma.... The answer is A (inside if)
@cloudproblemssolved
@cloudproblemssolved 3 ай бұрын
my answer for the question at the end: #include int main() { int number = -1; if(number == 0) printf("zero"); else if(number > 0) printf("positive"); else if(number < 0) printf("negative"); return 0; }
@shivamchauhan6404
@shivamchauhan6404 Жыл бұрын
// Online C compiler to run C program online #include int main() { // Write C code here double number; printf("Enter the number here:"); scanf("%lf", &number); if(number>0){ printf("The number is positive"); } else if(number == 0){ printf("The number is 0"); } else{ printf("The number is negative"); } return 0; } OUTPUT: Enter the number here: -18 The number is negative
@programizstudios
@programizstudios 2 жыл бұрын
Q. What is the output of the following code? #include int main() { int a = 5; if (!(a % 2 == 0)) { printf("Inside if"); } else { printf("Inside else"); } return 0; }
@metheshortgirlishika
@metheshortgirlishika 2 жыл бұрын
Output:-) inside if
@harshadatapre2133
@harshadatapre2133 2 жыл бұрын
A. Inside if
@my_talks01
@my_talks01 2 жыл бұрын
insideif
@arhitjoseph9681
@arhitjoseph9681 2 жыл бұрын
@@my_talks01 how bro?
@my_talks01
@my_talks01 2 жыл бұрын
@@arhitjoseph9681 a%2=1 ! (a%2==0) condition is true because a%2 is not equal to zero, so body of if statement exicuted , hence we can say , "inside if" printed .
@akibiswhere
@akibiswhere 10 ай бұрын
A real beginner - #include int main(){ double number; printf("Enter any number "); scanf("%lf", &number); if(number>=1){ printf("The number is positive"); }else if(number
@easyorganic1469
@easyorganic1469 Жыл бұрын
Mam these videos are very useful. Thank you for helping us. If possible please make a series on c++ language and dsa in it. this will be very benificial for me and many more like me. Thank you.]
@bilolnorqobilov5396
@bilolnorqobilov5396 2 жыл бұрын
int main() { double number; printf("Enter the number: ", number); scanf("%lf", &number); if(number>0){ printf("positive number"); } else if(number
@vincemichaelgudito8734
@vincemichaelgudito8734 Жыл бұрын
// Online C compiler to run C program online #include int main() { double number; printf("Enter a number:\t"); scanf("%lf", &number); if(number > 0){ printf("the number is positive"); } else if (number == 0){ printf("the number is zero"); } else if (number < 0){ printf("the number is negative"); } return 0; }
@boramawi
@boramawi Жыл бұрын
Wonderful Explanation with very short examples which are easy to follow.
@AmanGupta-zp5xi
@AmanGupta-zp5xi Жыл бұрын
Thank you mam, you have explained wonderfully 😊
@firedragonmangaming2410
@firedragonmangaming2410 2 жыл бұрын
#include int main(){ double number1; printf("Enter a decimal number: "); scanf("%lf", &number1); if (number1 > 0){ printf("Positive number"); } else if (number1 < 0){ printf("Negative number"); } else if (number1 == 0){ printf("Number is Zero"); } return 0; }
@uppilipavitra9634
@uppilipavitra9634 2 ай бұрын
#include int main() { int a=-5; if (a0){ printf("The number is positive"); } else { printf("The number is 0"); } return 0; } Mam,Your classes are very helpful us thank you so much mam
@h.d4632
@h.d4632 21 күн бұрын
#include int main() { double number; printf ("Enter a number:"); scanf ("%lf", &number); if (number>0){ printf ("The number %0.2lf is positive",number); } else if (number
@flick-ict2276
@flick-ict2276 Жыл бұрын
I love this video ❤️, I understood it perfectly well
@manindrapraharaj873
@manindrapraharaj873 2 жыл бұрын
// Online C compiler to run C program online #include int main() { double age ; printf("pls enter the age "); scanf("%lf",&age); printf("the value of age is %lf",age); if (age>0) { printf(" the number is positive"); } else if (age
@raghumanda2tanush496
@raghumanda2tanush496 2 жыл бұрын
really helpful course , simple and effective explanation
@samoboii
@samoboii Жыл бұрын
ANSWERS Task: double number; printf("please enter a number: "); scanf("%lf", &number); if (number > 0) { printf("this number is positive"); } else if (number < 0) { printf("this number is negative"); } else { printf("this number is 0"); } Quiz: inside if
@youngsunday8192
@youngsunday8192 Жыл бұрын
If Else Statements in c simplified thanks for making it easier 🙂🙂🙂🙂🙂🙂🙂🙂🙂
@plasmageorge4944
@plasmageorge4944 9 ай бұрын
Thank you
@mondmare9712
@mondmare9712 4 ай бұрын
Maam you are very resourceful and helpful. Im following in Papua New Guinea
@toufiqulislamtusar5265
@toufiqulislamtusar5265 10 ай бұрын
#include #include int main() { double number ; printf("Input number:"); scanf("%lf",&number); if(number > 0){ printf("The number is positive"); } if(number == 0){ printf("The number is zero"); } if(number < 0){ printf("The number is negetive"); } }
@siddharth840
@siddharth840 Жыл бұрын
#include int main(){ int num; printf("Enter the any number: "); scanf("%d", &num); if (num>0){ printf("THE NUMBER IS POSITIVE"); } else if (num==0){ printf("THE NUMBER IS ZERO"); } else{ printf("THE NUMBER IS NEGATIVE"); } return 0; } answer 11:37
@Bahaa.shaalan
@Bahaa.shaalan Жыл бұрын
#include int main(void) { double tempareture=-12; if(tempareture>=1){ printf("tempareture pasitive"); } else if(tempareture
@kidsstorytime1573
@kidsstorytime1573 Жыл бұрын
Answer to quiz is A #include int main() { // Write C code here double number; printf("what is your number? "); scanf("%lf", &number); if(number > 0){ printf("The number is positive"); } if(number < 0){ printf("The number is negative"); } if(number ==0){ printf("The number is 0"); } return 0; }
@islemkhelifa-ve7ip
@islemkhelifa-ve7ip Жыл бұрын
inside if , thank you teacher, you are the best
@kishorevenky2995
@kishorevenky2995 Жыл бұрын
#include int main() { double yn; printf("Enter your number"); scanf("%lf",&yn); if (yn>0){ printf("Your number is positive"); } else if(yn
@v.gkillergaming6973
@v.gkillergaming6973 Жыл бұрын
here the answer for your task mam thanks for teaching c easily #include int main() { double num; printf("enter the number :"); scanf("%lf", &num); if(num > 0) { printf("positve"); } if(num == 0) { printf("the number is 0"); } else if(num
@barkmiya2355
@barkmiya2355 2 жыл бұрын
int num; printf("enter a number: "); scanf("%d",&num); if (num < 0 ) { printf("the number i s nagative "); } else if ( num >0 ) { printf("the number is possitive "); } else if (num = 0) { printf("the number is zero"); } else { printf("you not entered a number plz inte a number "); }
@nihatdonmzov4166
@nihatdonmzov4166 Жыл бұрын
Thank you so much🙂
@tambirogerenow5863
@tambirogerenow5863 4 ай бұрын
Yeah yeah! 😊 its amazing lecture, the lecture was supper explicit Thanks, l like your working background, it's clear, l wish it can be clearer
@hyuga290__
@hyuga290__ 6 ай бұрын
#include int main() { double number; printf("Enter a number: "); scanf("%lf", &number); if (number > 0) { printf("The number is positive"); } else if (number < 0) { printf("The number is negative"); } else { printf("The number is 0"); } return 0; } 12:05
@onic9623
@onic9623 Жыл бұрын
Option A : Inside if -------------------------------------------------------------- #include int main() { int num; printf("Enter A Number: "); scanf("%d", &num); if (num == 0) { printf("The Number Is Zero"); } else if (num > 0) { printf("The Number Is Positive"); } else { printf("The Number Is Negative"); } return 0; }
@paulmuchemwa7950
@paulmuchemwa7950 2 жыл бұрын
been learning a lot. also the phone application has good notes to refer to
@Project.i
@Project.i 4 ай бұрын
//to display whether the entered number is positive or negative #include int main() { double number; printf("enter the number: "); scanf("%lf", &number); if (number > 0){ printf("The entered number is positive"); } else if (number < 0){ printf("The entered number is negative"); } else { printf("The entered number is zero"); } return 0; }
@fountain9886
@fountain9886 Жыл бұрын
#include int main() { double number; printf("Enter Your Number :"); scanf("%lf",number); if (number>=0){ printf("Number is Positive"); } else if (number
@sychok958
@sychok958 2 жыл бұрын
Video is helpful and understadable~~thanksss a lot
@girmamihrete4597
@girmamihrete4597 2 жыл бұрын
// Online C compiler to run C program online /*This is a program to check whether a number is a positive, negative or a zero.*/ #include int main() { double number; printf("Enter any number: "); scanf("%lf", &number); if(number>0) { printf("The number %.2lf is positive.",number); } if(number==0) { printf("The number %.2lf is Zero.",number); } if(number
@user-ct1lo9ss2u
@user-ct1lo9ss2u 5 ай бұрын
#include int main() { double num; printf("ENTER THE NUMBER: "); scanf("%lf", &num); if(num>1){ printf("THE NUMBER IS POSITIVE"); } else if(num == 0){ printf("THE NUMBER IS ZERO '0'"); } else{ printf("THE NUMBER IS NEGATIVE"); } return 0; }
@YasiruNadeesha
@YasiruNadeesha 6 ай бұрын
// Online C compiler to run C program online #include int main() { double number; printf("enter your number:"); scanf("%lf",&number); if (number > 0){ printf("the number is positive. "); } else if(number < 0){ printf("the number is negative. "); } else if (number == 0){ printf("the number is zero. "); } return 0; }
@toykeem
@toykeem Жыл бұрын
thank you programiz. the answer to the quiz question is option A
@Mumbai-Vlog
@Mumbai-Vlog Жыл бұрын
Amazing explanation
@raghavendrarao6973
@raghavendrarao6973 2 жыл бұрын
thanks a lot maam , your videos are very helpful
@programizstudios
@programizstudios 2 жыл бұрын
thanks, really nice to hear this
@nihatdonmzov4166
@nihatdonmzov4166 Жыл бұрын
Great video
@ritiksingh1484
@ritiksingh1484 Жыл бұрын
Love Your Voice ☺
@flashman6620
@flashman6620 2 жыл бұрын
It,s amazing thank you for your efforts
@devarapallivamsi2981
@devarapallivamsi2981 2 жыл бұрын
#include int main() { printf("Thank you programiz team"); return 0; }
@tambirogerenow5863
@tambirogerenow5863 4 ай бұрын
Please can you make videos too on C++,java and python?
@nihatdonmzov4166
@nihatdonmzov4166 Жыл бұрын
Very helpful
@ganeshbabubandi8886
@ganeshbabubandi8886 2 жыл бұрын
b) inside else
@srikanthkotaru515
@srikanthkotaru515 Жыл бұрын
// Online C compiler to run C program online #include int main() { // Write C code here double number; printf("enter the number: "); scanf("%lf", &number); if(number>=1){ printf("the number is positive"); } else if(number
@tanmaykumartewary2166
@tanmaykumartewary2166 2 жыл бұрын
This course is really very helpful...plz increase the video frequency.
@programizstudios
@programizstudios 2 жыл бұрын
Thank you! We appreciate your thoughts.
@tonymusyoka6572
@tonymusyoka6572 Жыл бұрын
You are the best. You made fall inlove with proogramming
@manojplays2590
@manojplays2590 3 ай бұрын
#include int main() { int number; printf("enter your number"); scanf("%d",&number); if (number>0){ printf("its a positive number"); } if (number
@MattyMm
@MattyMm 4 ай бұрын
thanks
@pristinewalek4578
@pristinewalek4578 2 жыл бұрын
Answer is Inside if
@doctor2345
@doctor2345 8 ай бұрын
extremely helpful. keep it up!
@olisaemekaaghabuilo8688
@olisaemekaaghabuilo8688 Жыл бұрын
A. because the ! will evaluate the if condition to true thereby making the program print "inside if"
@JoshuaOgugua
@JoshuaOgugua Жыл бұрын
I love the simplicity
@user-er6qc7go5n
@user-er6qc7go5n Ай бұрын
#include int main(){ int num; printf("please provide a number :"); scanf("%d",&num); if(num > 0){ printf("the input is positive "); } else if(num < 0){ printf("the input is negative "); } if (num == 0){ printf("the input is zero "); } return 0; }
@GideonMwangi-wp4up
@GideonMwangi-wp4up 2 ай бұрын
Nyce program
@d3vyn22
@d3vyn22 10 ай бұрын
u make c easy
@syedadil799
@syedadil799 2 жыл бұрын
Thanks a lot
@adib0825
@adib0825 2 ай бұрын
#include int main(){ double number; printf(" Write your double number"); scanf("%lf", &number); if(number>0){ printf("the number is positive"); } else if (number
@someshjitu4546
@someshjitu4546 2 жыл бұрын
Nice 👍
@pratibhasrivastav2698
@pratibhasrivastav2698 Жыл бұрын
My solution- #include int main() { double input; printf(Enter decimal: ); scanf("%lf",&input); if (input == 0){ printf("The number is 0."); } else if(input>0){ printf("The number is positive."); } else{ printf("The number is negetive."); } return 0; }
@amphorashaven7258
@amphorashaven7258 Жыл бұрын
// Online C compiler to run C program online #include int main() { // this code checks if number is positive, negative or zero double number; printf("Enter a number "); scanf("%lf", &number); if(number > 0) { printf("the number is positive"); } else if(number < 0) { printf("the number is negative"); } else if(number == 0) { printf("the number is 0"); } return 0; }
@shadhil3144
@shadhil3144 2 жыл бұрын
Please upload a series tutoring java script
@gogulram2551
@gogulram2551 2 жыл бұрын
#include int main() { double number; printf("enter the number:"); scanf("%lf", &number); if(number > 0){ printf("the number is positive"); } else if(number < 0){ printf("the number is negative"); } else if(number == 0){ printf("the number is zero"); } return 0; } the program u asked to do by us
@anasasif8714
@anasasif8714 9 ай бұрын
option A
@solomonnicholas5083
@solomonnicholas5083 11 ай бұрын
#include int main () { double number; printf("enter a number: "); scanf("%lf", &number); if(number >=1) {printf("this is a positive number");} else if(number
@victorcoded
@victorcoded Жыл бұрын
inside if great work
@ankyhiggs1617
@ankyhiggs1617 2 жыл бұрын
Mam plz upload videos daily
@saqibmalik5186
@saqibmalik5186 2 жыл бұрын
thanks 💥😍
@kajialbums7421
@kajialbums7421 9 ай бұрын
its inside if, because the ! is logical not true and since the operative number is 0 than its right, unless the operative number is not 0. correct me if I missed something.
@Usmankhan-q8z5s
@Usmankhan-q8z5s Жыл бұрын
I really inspired to your lecture ❤
@BeLikeSairaj
@BeLikeSairaj 13 күн бұрын
#include int main () { double number; printf("Enter the number: "); scanf("%lf", &number); if (number==0) { printf(" The Number is neutral!"); } else if (number
@bandulajagathkumara1038
@bandulajagathkumara1038 Жыл бұрын
#include int main(void) { // Variable deceleration int num; // User inputs printf("Enter a number : "); scanf("%d",&num); // Condition 01 if(num > 0) { printf("number %d is positive",num); } // Condition 02 else if(num < 0){ printf("number %d is negative",num); } // Condition 03 else if(num == 0){ printf("number %d is equal to 0",num); } }
@megavarshinim4157
@megavarshinim4157 2 жыл бұрын
// Online C compiler to run C program online #include int main() { int x; printf(" enter the value of x = "); scanf("%d", &x); if(x>0){ printf("x is positive"); } else if(x
@ishikasoni1305
@ishikasoni1305 2 жыл бұрын
Ma'am plz upload videos fast it will be beneficial
@blaugranalvent
@blaugranalvent Жыл бұрын
thank you for your amazing work
@jp23x
@jp23x Ай бұрын
double number; printf("choose a number: "); scanf("%lf", &number); if(number > 0){ printf("the number is positive "); } else if(number < 0){ printf("the number is negative "); } else { printf("the number is 0 "); }
#10: Ternary Operator in C | C Programming for Beginners
6:38
#8: Boolean and Comparison Operators in C Programming
14:41
Programiz
Рет қаралды 115 М.
Ouch.. 🤕
00:30
Celine & Michiel
Рет қаралды 41 МЛН
OMG what happened??😳 filaretiki family✨ #social
01:00
Filaretiki
Рет қаралды 11 МЛН
Gli occhiali da sole non mi hanno coperto! 😎
00:13
Senza Limiti
Рет қаралды 9 МЛН
ISSEI & yellow girl 💛
00:33
ISSEI / いっせい
Рет қаралды 18 МЛН
C_29 Nested If in C | C Programming Tutorials
15:07
Jenny's Lectures CS IT
Рет қаралды 206 М.
Learn Any Programming Language In 3 Hours!
22:37
Code With Huw
Рет қаралды 339 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 395 М.
The ONE Thing Most C Programmers Get Wrong!
11:02
Code With Huw
Рет қаралды 31 М.
how Google writes gorgeous C++
7:40
Low Level Learning
Рет қаралды 850 М.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,1 МЛН
#12: while Loop in C Programming |  C Programming for Beginners
12:45
C_28 If-Else Statement in C | C Programming Tutorials
11:17
Jenny's Lectures CS IT
Рет қаралды 200 М.
Ouch.. 🤕
00:30
Celine & Michiel
Рет қаралды 41 МЛН