If Else Control Statements In C: C Tutorial In Hindi #10

Sdílet
Vložit
  • čas přidán 26. 04. 2019
  • In this c programming tutorial video, I have explained you about if else conditionals in c and examples of the same in c. I hope you are enjoying this C course in Hindi.
    ►This C Lecture is a part of this C Programming Course: • C Language Tutorials I...
    ►Source Code + Notes: codewithharry.com/videos/c-la...
    ►Click here to subscribe - / @codewithharry
    Best Hindi Videos For Learning Programming:
    ►Learn Python In One Video - • Learn Python In Hindi ...
    ►Learn JavaScript in One Video - • JavaScript Tutorial
    ►Learn PHP In One Video - • Learn Php In One Video...
    ►Machine Learning Using Python - • Machine Learning Tutor...
    ►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
    ►Advanced Python Tutorials - • Intermediate/Advanced ...
    ►Object Oriented Programming In Python - • Object Oriented Progra...
    ►Python Data Science and Big Data Tutorials - • Python Data Science an...
    Follow Me On Social Media
    ►Website (created using Flask) - www.codewithharry.com
    ►Facebook - / codewithharry
    ►Instagram - / codewithharry
    ►Personal Facebook A/c - / geekyharis
    Twitter - / haris_is_here

Komentáře • 3K

  • @CodeWithHarry
    @CodeWithHarry  Před 5 lety +1361

    Hope you are enjoying this course guys?
    Like aur Share karna mat bhoolna :)

    • @allintrends6278
      @allintrends6278 Před 4 lety +20

      Harry Bhai. aap inke solutions bhi dala karo
      aur ye batao iski new video after video number 76 kab a rahi hai
      ya ye course finish ho gaya. pls pls pla🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔🤔

    • @rahilbadi7641
      @rahilbadi7641 Před 4 lety +187

      Math and science = 45
      Math = 15
      Science = 15
      #include
      Int main(){
      Int gift;
      Printf ("enter of the subject you passed
      ");
      Printf ("press 1 only math
      ");
      Printf ("press 2 only science
      ");
      Printf ("press 3 both science and math
      ");
      Scanf ("%d", &gift);
      If (gift=1){
      Printed("your gift is a 15 rupees you passed math
      ");
      }
      Else if (gift=2){
      Printf("your gift is a 15 rupees you passed science
      ");
      }
      Else if(gift=3){
      Printed("your gift is a 45 rupees you passed both science and math
      ");
      }
      Else{
      Printf("you enter wrong number
      ");
      Printed("try again
      ");
      }
      Return 0;
      }

    • @manasranjansatapathy5145
      @manasranjansatapathy5145 Před 4 lety +20

      Harry bhai nested if ka concept apne kyu nehi padhaya??

    • @harsharora3535
      @harsharora3535 Před 4 lety

      Very helpful sr

    • @MohdKashif-rn6jl
      @MohdKashif-rn6jl Před 4 lety +23

      Sir isme kya glti h
      #include
      int main()
      {
      int subject;
      printf("what subject you passed out ?
      ");
      printf("1 Maths
      ");
      printf("2 Science
      ");
      printf("3 both
      ");
      scanf("%d", &subject);
      //below is the code for giving gift//
      if(subject

  • @purabsinghhh7839
    @purabsinghhh7839 Před 4 lety +591

    Sir you deserve a million of subscriber ❤

  • @user-pg4hf1kx1h
    @user-pg4hf1kx1h Před 10 měsíci +108

    To all those who do are not able to code the question here is the answer
    #include
    int main()
    {
    int subject;
    printf("The list of subjects which you have passed has been given below
    ");
    printf("1. Science only
    2. Maths only
    3. Both Science and Maths
    ");
    printf("Choose one of the options above: ");
    scanf("%d", &subject);
    if (subject == 1)
    {
    printf("Hurrayy! You have won 15 rupees");
    }
    else if (subject == 2)
    {
    printf("Hurrayy! You have won 15 rupees");
    }
    else if (subject == 3)
    {
    printf("Hurrayy! You have won 45 rupees");
    }
    else
    {
    printf("You have made an invalid choice!");
    }



    return 0;
    }
    Challenge accepted and solved also Harry bhaii

    • @janhvinarayan1633
      @janhvinarayan1633 Před 7 měsíci +5

      wow it's working, i tried with string input but it didn't work unfortunately, I didn't think like this, you're smart

    • @shahbj801
      @shahbj801 Před 7 měsíci +1

      what if he has failed in both better option is using operatorslike && and || for maths and sci and maths or sci and use else if he has failed in both

    • @PoeticJai
      @PoeticJai Před 7 měsíci +3

      #include
      int main() {
      /*
      shayad character datatype ko aise krte hain value assign like 'a'
      */
      int subject1;
      int subject2;
      /*
      1 is maths
      2 is science
      */
      printf("enter the subjects in which you have excelled
      ");
      scanf("%d %d", &subject1,&subject2);
      if(subject1 == 1 && subject2 != 2) {
      printf("you get 15 rupees !
      ");
      }
      else if(subject1 != 1 && subject2 == 2) {
      printf("you get 15 rupees !
      ");
      }
      else if (subject1 == 1 && subject2 == 2) {
      printf("you get 45 rupees
      ");
      }
      else {
      printf("you get nothing");
      }
      return 0;
      }
      i know its not the best one but mine is like this @@janhvinarayan1633

    • @PoeticJai
      @PoeticJai Před 7 měsíci +3

      #include
      int main() {
      /*
      shayad character datatype ko aise krte hain value assign like 'a'
      */
      int subject1;
      int subject2;
      /*
      1 is maths
      2 is science
      */
      printf("enter the subjects in which you have excelled
      ");
      scanf("%d %d", &subject1,&subject2);
      if(subject1 == 1 && subject2 != 2) {
      printf("you get 15 rupees !
      ");
      }
      else if(subject1 != 1 && subject2 == 2) {
      printf("you get 15 rupees !
      ");
      }
      else if (subject1 == 1 && subject2 == 2) {
      printf("you get 45 rupees
      ");
      }
      else {
      printf("you get nothing");
      }
      return 0;
      }
      i know its not the best one but mine is like this @@shahbj801

    • @DhirendraMishra-xr5yw
      @DhirendraMishra-xr5yw Před 7 měsíci

      Bhai tumne jo code bheja h vo opertate nhii ho paa rha h result kuch dikha hi nhii rha h

  • @crcbheskatri6045
    @crcbheskatri6045 Před 3 lety +82

    no one can defeat you in teaching programming. thank you.

  • @vijaybindra7320
    @vijaybindra7320 Před 4 lety +61

    Bro please teach algorithm and it's flowchart. Its a request....
    You teach very well.. Thank you for guidance

  • @VinayYadav-vc4zl
    @VinayYadav-vc4zl Před 2 lety +5

    Thanks Harry.
    This is my first programming language and you make this very easy.

  • @rajputfitness8641
    @rajputfitness8641 Před 2 lety +152

    #include
    int main (){
    int a;
    printf("In how many sub you got passing marks
    ");
    printf("enter 1 if pass in maths
    ");
    printf("enter 2 if pass in science
    ");
    printf("enter 3 if pass in both
    ");
    scanf("%d",&a);
    if(a==1||a==2){
    printf("congratulations you got ₹15");
    }
    else if(a==3){
    printf("congratulations you got ₹45");
    }
    return 0;
    }
    I think 🤔 I m late 😅 but still I got what you explain

    • @anugaming4625
      @anugaming4625 Před rokem +1

      👍🏻

    • @rajputfitness8641
      @rajputfitness8641 Před rokem +1

      @@laiqaasif4312 kya Kamal ha 😂

    • @ujjwalkumar9532
      @ujjwalkumar9532 Před rokem +8

      # include
      int main(){
      int number;
      printf("enter the number
      ");
      printf("enter 1 for pcm
      ");
      printf("enter 2 for science
      ");
      printf("enter 3 for maths
      ");
      printf("enter the number
      ");
      scanf("%d", &number);
      if(number==1){
      printf("you got 50 points
      ");
      }
      else if(number==2){
      printf("you got 20 points
      ");
      }
      else if(number==3){
      printf("you got 20 points
      ");
      }
      else{
      printf("invalid");
      }
      return 0;
      }
      Check this out...

    • @AmitSharma-nv2oj
      @AmitSharma-nv2oj Před rokem +1

      Bro can you please help if i want to make my user enter maths science as input what should i do? Please reply

    • @AmitSharma-nv2oj
      @AmitSharma-nv2oj Před rokem +1

      @@ujjwalkumar9532 Bro can you please help if i want to make my user enter maths science as input what should i do? Please reply

  • @aditya._.official
    @aditya._.official Před 4 lety +139

    भाई आपका पढ़ाने का तरीका बहुत ही अच्छा है ।
    हम आपका किस तरह से शुक्रिया अदा करे 🙏🙏

    • @satyamgupta2953
      @satyamgupta2953 Před 3 lety +9

      Video ko share karke

    • @aditya._.official
      @aditya._.official Před 3 lety +3

      @@satyamgupta2953 जरूर मेरे भाई ☺️

    • @Tushhar_0019
      @Tushhar_0019 Před 3 lety +2

      i3 10th gen laptop coading k liye chalega kay please koi to batao almost 5 year

    • @yashvendra_singh
      @yashvendra_singh Před 3 lety +1

      @@Tushhar_0019 chalega Bhai
      Mere to mobile me hi chalta h😂😂

    • @yashpatel533
      @yashpatel533 Před 3 lety

      @@Tushhar_0019 nai chalega tere pass paise he to i5 hi le nahi he to i3 le

  • @Tech_world17
    @Tech_world17 Před 2 lety +5

    Thank you very much sir for giving me this information about if ,else statement . you way of teaching is very good ❤👌❤👍

  • @luckykamble6065
    @luckykamble6065 Před 2 lety +1

    Sir you diserve all world population as your followers you are an example of creating an new world love your video lots of love keep it up

  • @vbhav-232
    @vbhav-232 Před rokem +89

    #include
    // maths and science -45
    // science -15
    // maths -15
    int main ()
    {
    int sub ;
    printf("Enter which all subject you passed :
    ");
    printf("1 for maths and science
    2 for maths
    3 for science :
    ");
    scanf("%d",&sub);
    if(sub==1)
    {
    printf("45 rupee gift ");
    }
    else if (sub==2)
    {
    printf("15 rupee gift ");
    }
    else if(sub==3)
    {
    printf("15 rupee gift ");
    }
    else
    {
    printf("Wrong choice :");
    }
    }

    • @rohitashrohitashkhan9735
      @rohitashrohitashkhan9735 Před rokem

      Waah bro

    • @sangeetha6691
      @sangeetha6691 Před rokem

      👆🏻👍🏻

    • @darwing2912
      @darwing2912 Před rokem +1

      @@sangeetha6691 it's wrong

    • @darwing2912
      @darwing2912 Před rokem +9

      @@sangeetha6691 that the right code
      #include
      #include
      int main()
      {
      char maths[50]; // declaration of char array
      char science[50]; // declaration of char array
      printf("Give Answer in Yes or NO
      ");
      printf("Are you pass in Maths ");
      scanf("%s", &maths);
      printf("What's about Sceince, are you pass in Science ");
      scanf("%s", &science);
      // comparing both the strings using strcmp() function
      if ((strcmp(maths,"yes")==0) && (strcmp(science,"yes")==0)){
      printf("Welldone my boy You got 45$ for this acheivement");
      }
      else if ((strcmp(maths,"no")==0)&&(strcmp(science,"yes")==0)){
      printf("You only pass in sceince You got only 15$");
      }
      else if ((strcmp(maths,"yes")==0)&&(strcmp(science,"no")==0)){
      printf("You only pass in Maths You got only 15$");
      }
      else{
      printf("You fail in both subject You need to work hard why are wasting your parents money");
      }
      return 0;
      }

    • @vishalverma-sg6vm
      @vishalverma-sg6vm Před rokem

      bhai code copy nhi ho rha

  • @blessedthoughts437
    @blessedthoughts437 Před 4 lety +193

    #include
    int main(int argc, char const *argv[])
    {
    int exam;
    printf ("Which Subject you have clear
    ", exam);
    printf ("You have clear maths then press 1
    ", exam);
    printf ("You have clear science then press 2
    ", exam);
    printf ("You have clear both subjects then press 3
    ", exam);
    scanf ("%d",&exam);

    if (exam==1)
    {
    printf("you won 15 rupee");
    }

    else if (exam==2)
    {
    printf("you won 15 rupee");
    }
    else if (exam==3)
    {
    printf("you won 45 rupee");
    }



    return 0;
    }

    • @athletefitness716
      @athletefitness716 Před 3 lety +5

      You are great also

    • @vanshitamishra3896
      @vanshitamishra3896 Před 3 lety +7

      I tried yours..but idk why my 2nd else if statement is not working I.e. if I write 2nd else if statement in 1st else if position it works correctly but as soon as I write the 2nd else if it shows error ..hope I have made my query clear ..help

    • @FaisalAli-kx6nv
      @FaisalAli-kx6nv Před 3 lety +2

      Great

    • @shubhisaxena2725
      @shubhisaxena2725 Před 3 lety +15

      how did you comeup with the idea of this code I wasn't able to think like this

    • @adityarathod504
      @adityarathod504 Před 3 lety +4

      bro the only mistake is ....u don't have to assign "exam" after the statement you have entered,we add if we want to assign that value in it using %d.

  • @mohdabdulmuqtadir1079
    @mohdabdulmuqtadir1079 Před 2 lety +5

    Sir explanation ever . U deserve millions of subscribers and thank u very much for giving us such a good explanation . Love from Hyderabad

  • @pksingh3589
    @pksingh3589 Před 4 lety +26

    Hello harry, You are doing very well. I have not seen C so simple ever. You made it so simple to learn. You are doing such a amazing work for students and people who want to clear their concept using your tutorial. I am technical Engineer in govt job. i was trying to learn C from last one year for making good logical program and want to learn to burn this program on arduino board.
    But always getting confused. You have made my mind so simple to learn C and make me crazy to learn more & more. Keep it up harry bro. All you have presented in desi bhasha which shows that a friend is teaching us. You are such a real hero. From my side you are a nobel prize winner.......

  • @rakhikumari6035
    @rakhikumari6035 Před 3 lety +10

    He is amazing man👍...❤️

  • @ManishKumar-gs4rd
    @ManishKumar-gs4rd Před rokem

    Hi, sir i'm very glad to let you know i'm learning the c lang. watching to your tutorial videos.
    and i want to ginving you so much thank you.

  • @justingray7290
    @justingray7290 Před 5 měsíci

    Bro I’ve seen the same content that you post on CZcams by other people but bhai you are just amazing I just love the way you explain things and you have no idea how big of a help you have been I don’t usually comment but I would like to show you my appreciation and would like to say Thankyou so much bhai
    Bro fist 🤜

  • @adityarajkumawat1015
    @adityarajkumawat1015 Před 5 lety +7

    7 th Awesome Video
    Keep teaching Harry bhai.

  • @way4pc740
    @way4pc740 Před 5 lety +11

    best pogramming channel in youtube

  • @fozii-he1ql
    @fozii-he1ql Před 2 měsíci +1

    #include
    int main()
    {
    int maths, science;
    printf("enter 1 if you have passed in science 0 otherwise");
    scanf("%d",&science);
    printf("enter 1 if you have passes in maths 0 otherwise");
    scanf("%d",&maths);
    if(maths && science ){
    printf("you have won 45 rs prize
    ");
    } else if(maths || science){
    printf("you have won 20 rs prize
    ");
    } else{
    printf("sorry you have not won any prize");
    }

    return 0;
    }
    its not best but it is working💫

  • @chandrabhanchoudhary1815

    Best youtube channel for programming 🔥🔥

  • @manish2328
    @manish2328 Před rokem +6

    This course is very helpful and my concepts in C are getting better also the notes you provide is amazing ❤

  • @shivrajanand2002
    @shivrajanand2002 Před 2 lety +56

    literally these free educational videos are bringing back the main essence of education: "Available to all and no price to pay"

    • @pythonkrishna290
      @pythonkrishna290 Před rokem +1

      you should have given the quiz solution instead of these.

    • @Josuke217
      @Josuke217 Před rokem +1

      @@pythonkrishna290 lol

  • @FunUnlimitedHKD
    @FunUnlimitedHKD Před 4 lety +4

    Sir I am a student of BCA 1st sem and today i watch your video and i am very happy that i found my channel love you sir and i like your explanation

  • @adityadebnath2037
    @adityadebnath2037 Před rokem +1

    Thank you so much for making such a great course for us !!!!!!!!!!!!!

  • @VeerSoni-l4b
    @VeerSoni-l4b Před 16 dny

    we are enjoying this course thank you very much for this amazing course

  • @devanshgautam4803
    @devanshgautam4803 Před 3 lety +3

    Sir enjoying this series... Thank u so much sir🙏❤️

  • @aakash9025
    @aakash9025 Před 5 lety +10

    Luv u bro 👍 . YOU R PERFECT ❤️

  • @AjayKumar-wx5qw
    @AjayKumar-wx5qw Před rokem +1

    challenge accepted🙃
    i am enjoying this course thanks buddy.

  • @Sneha-ow3ip
    @Sneha-ow3ip Před rokem +16

    challenge accepted sir😌🙌❤
    here is the code of your qwestion👇
    #include
    int main(){
    int subject;
    //1 use for science
    //2 use for math
    //3 use for science math
    printf("choose 1 for science, 2 for math, and 3 for science-math
    ");
    printf ("enter your subject code you have passed
    ");
    scanf("%d
    ",&subject);
    if (subject==1){
    printf("you got 15 rupees");
    }
    else if (subject==2){
    printf("you got 20 rupees");
    }

    else if (subject== 3){
    printf("you got 45 rupees");
    }
    else{
    printf("you entered wrong subject code");
    }
    }

    • @uk01..75
      @uk01..75 Před rokem

      Good 🐱

    • @faizasattar5422
      @faizasattar5422 Před rokem +1

      I couldn't find the code on website which Harry provided for this problem ? Can you help me finding that ?

    • @shivanipatwa4709
      @shivanipatwa4709 Před 7 měsíci +1

      cant we direct write name of the subject like maths and science And code like this....
      #include
      int main ()
      {
      int maths , science;
      printf("enter the name of subject you passed b/w maths and science");
      scanf("%d %d" , &maths ,&science);
      if (maths && science)
      {
      printf(" you have awarded gift of 45 rupees");
      }
      else if (maths)
      {
      printf("you have awarded gift of 15 rupees ");
      }
      else (science)
      {
      printf("you have awarded gift of 15 rupees");
      }
      return 0;
      }

    • @harshlikhariofficiall2007
      @harshlikhariofficiall2007 Před 6 měsíci

      @@shivanipatwa4709 thanks 😊

  • @AjoAjo-yt3uo
    @AjoAjo-yt3uo Před 10 měsíci +2

    I have not even started watching him yet 😭 but his channel shouts " i wanna be the best thing that's ever happened to you"
    Thank you❤

  • @swagatadas7046
    @swagatadas7046 Před 3 lety +5

    i am learning c with ur lectures and believe me bro u r awesome. i have liked ur videos and subscribed ur channel and also shared with my friends. thank u.

  • @rohitjain282
    @rohitjain282 Před 4 lety +7

    Challenge accepted, GREAT WORK sir, I will surely try to complete all the courses you are teaching

  • @mithpal4173
    @mithpal4173 Před 11 měsíci +1

    Challenge accepted sir
    thank you for your excellent guidance ❤❤🔥🔥🔥

  • @Ussr14493
    @Ussr14493 Před 2 měsíci +1

    having experience of python helps really much dont even feel like beginner in c after learning concepts

  • @fanofcoc7541
    @fanofcoc7541 Před 3 lety +3

    Harry bhai aab bahut accha padhate hai 🥰👍.koi nhi hai utube par aisa

  • @kenysheikh2041
    @kenysheikh2041 Před 2 lety +4

    Loved your work! Keep teaching..

  • @Xyztwothree
    @Xyztwothree Před měsícem

    challenge accepted my buddy course is going at its pace and is fantastic thank you for this helpful course 👍👍✌✌ and take care

  • @tirthrajmahajan1393
    @tirthrajmahajan1393 Před rokem

    The explaining way is best harry bhai love from jalgaon, maharashtra

  • @light7560
    @light7560 Před 3 lety +4

    You are the best teacher Harry bhai ❤

  • @tejaslamsoge4511
    @tejaslamsoge4511 Před 3 lety +3

    really helping me to learn c

  • @jaiveersingh8688
    @jaiveersingh8688 Před rokem +1

    #include
    int main()
    {
    int a, b;
    printf("Here are some rules:- 1---> Yes, 2---> No ");

    printf("
    Have you passed Maths exam:- ");
    scanf("%d", &a);
    printf("
    Have you passed Science exam:- ");
    scanf("%d", &b);
    if (a==1 && b ==1)
    {
    printf("You've won Rs. 45");
    }
    else if (a==1)
    {
    printf("You've won Rs. 10");
    }
    else if (b==1)
    {
    printf("You've won Rs.20");
    }
    else
    {
    printf("Study more harder to get rewards.");
    }
    return 0;
    }
    Loved it.

  • @iambhadresh13
    @iambhadresh13 Před rokem

    it is the best channel for learning coding...'

  • @satyamraikar5791
    @satyamraikar5791 Před rokem

    i was searching for a videos to learn c ++
    after so many video i finaly got ur palylist u r the best tearcher

  • @tahiraismail6942
    @tahiraismail6942 Před 4 lety +11

    You are too good person.....
    seriously I got alot of help from your lectures Allah bless you alot alot thank you so much ❤️👍💯!!!

  • @ekansh6267
    @ekansh6267 Před 2 lety +6

    Beautifully explained 👌🏻🔥

  • @akaaryanyt9756
    @akaaryanyt9756 Před 4 lety +15

    A switch statement tests the value of a variable and compares it with multiple cases. Once the case match is found, a block of statements associated with that particular case is executed. Each casein a block of a switch has a different name/number which is referred to as an identifier.

  • @InfolkWell
    @InfolkWell Před 4 lety +10

    #include
    Int main ()
    {
    Int age;
    Printf("enter your age ");
    Scanf("%d",&age);
    If (age>18)
    Printf(you can drive);
    Else
    {
    Printf ("you cannot drive");
    }
    Return 0;

    • @nirajgurjar6843
      @nirajgurjar6843 Před 4 lety +4

      After
      Return 0 You Have To Give These }
      Return 0
      }

  • @user-km3lg6fv7v
    @user-km3lg6fv7v Před 3 měsíci

    very useful harry sir.
    😀

  • @emkaywho
    @emkaywho Před rokem

    Thank you 🙏

  • @akashgupta6254
    @akashgupta6254 Před 5 lety +12

    Osm❤❤

  • @kapilchaudhary1079
    @kapilchaudhary1079 Před 3 lety +11

    Bhai challage ka code bhi share kr diya kro jitne bhi diye h check krne k liye .
    Wese bhai maja aa rha h
    Printf("maza aa rha h");

  • @ayushchauhan3097
    @ayushchauhan3097 Před rokem +214

    #include
    int main(){
    int subject;
    printf("Which subject did you passed
    "
    "1.Maths & Science
    "
    "2.Science
    "
    "3.Maths
    ");
    scanf("%d", &subject);
    if (subject==1)
    {
    printf("CONGRATS! Your prize is 45");
    }
    else if (subject==2)
    {
    printf("CONGRATS! Your prize is 15");
    }
    else if (subject==3)
    {
    printf("CONGRATS! Your prize is 15");
    }

    return 0;
    }

  • @kevin_7416
    @kevin_7416 Před 4 měsíci

    Brother thank you you just came like god here

  • @itsritika3561
    @itsritika3561 Před 4 lety +14

    Keep teaching like this ...sir...and thankyou for such a great effort..👍👍

    • @prateikpati1
      @prateikpati1 Před 3 lety

      Your code is Run....
      (Print the type of gift you are giving to the)
      Please send me solution

    • @shivamsingh-rk4rs
      @shivamsingh-rk4rs Před 3 lety

      Plz provide me code of this

  • @ayushnikhade2003
    @ayushnikhade2003 Před 2 lety +16

    You are too best 💕 and your way of explain and to communicate is also superb ☺️
    And the main thing is, this amazing course is free
    Thank you So Much Harry Sir.

  • @diveshmishra9391
    @diveshmishra9391 Před rokem

    Your are the best teacher sir

  • @skytoucher6157
    @skytoucher6157 Před 5 lety +24

    ... i was confused how should i start . those tutorial on websites are very complicated and terrible .
    but your body language and expressing techniques are damn amezing .

  • @aadityashahilgaming911
    @aadityashahilgaming911 Před 4 lety +17

    i solve it myself
    #include
    int main()
    { int Math, science;
    printf("Enter your mark of Math
    ");
    scanf("%d", &Math);
    printf("Enter your mark of science
    ");
    scanf("%d", &science);
    printf("you have entered %d as your mark of Math
    ", Math);
    printf("you have entered %d as your mark of science
    ",science);

    if (Math>=40,science>=40)
    {
    printf("you have passed both subject");
    printf("you will be given RS 100");
    }

    else if (Math40)
    {
    printf("you have passed in science");
    printf("you have failed in Math");
    printf("you will be given just RS 50");
    }

    else if (Math>40,science

  • @vishalraj7714
    @vishalraj7714 Před rokem

    Mind blowing sir 👌👌

  • @iabdullahsadiq
    @iabdullahsadiq Před rokem

    Thank you harry Bhai 💙

  • @rajroxes
    @rajroxes Před 5 lety +4

    Hey dear ,please tell me after learn python which platform we use to make a app please help me ..
    Please sir

  • @Infiniteknowledgenikhilrathod

    Best of Best 🙌

  • @raghavbhardwaj5081
    @raghavbhardwaj5081 Před 9 měsíci

    Subject se toh nhi hua but maine marks ke according price distribution kr diya acche se run bhi hogya thankyou ❤

  • @_devenderpal_
    @_devenderpal_ Před 5 lety +6

    Well dne i was waiting for it

    • @CodeWithHarry
      @CodeWithHarry  Před 5 lety +8

      Hope you are enjoying!

    • @pranabbhunia1995
      @pranabbhunia1995 Před 4 lety +11

      @@CodeWithHarry #include
      int main()
      {
      int sc,ar;
      printf("enter the science number(pass mark 85).....
      ");
      scanf("%d",&sc);
      printf("enter the arts number(pass mark 85).....
      ");
      scanf("%d",&ar);
      if((sc>=0)&&(sc=85)
      {
      printf("pass in science with %d
      ",sc);
      }

      }
      else
      {
      printf("not in range...");
      }
      if((ar>=0)&&(ar=85)
      {
      printf("pass in arts with %d
      ",ar);
      }

      }
      else
      {
      printf("not in range...");
      }
      if((sc>=85)&&(ar>=85))
      {
      printf("pass in both and got 45 rupees.....");
      }
      else if(sc>=85)
      {
      printf("pass in science only got 15 rupees");
      }
      else if(ar>=85)
      {
      printf("pass in arts only and got 15 rupees only");
      }
      else
      {
      printf("better luck next time heheheheehhehehe");
      }
      }

  • @financialplanner3195
    @financialplanner3195 Před 4 lety +30

    printf("harry is so great");

  • @VChangeDWorld
    @VChangeDWorld Před rokem +2

    Sir I was in trouble with the code runner even I didn’t knew that my code ran at output when i saw it, it was the only error and i have solved that easily… Thanks a lot ❤

  • @ankita8909
    @ankita8909 Před rokem +1

    You are an amazing teacher👏👏
    Thank you 😇

  • @ayushneupane9819
    @ayushneupane9819 Před 3 lety +4

    I did the Quiz brother and i passed. I am going forward in my syllabus all because of you. Thankyou so much.

  • @sumitbaghel7250
    @sumitbaghel7250 Před 4 lety +429

    #include
    int main()
    {
    int a;
    printf("Enter How many Subject you passed
    ");
    printf("Enter 1 if you passed maths
    ");
    printf("Enter 2 if you passed science
    ");
    printf("Enter 3 if you passed both math and science
    ");
    scanf("%d",&a);
    if(a==3)
    {
    printf("Congratulations You won Rs.45");
    }
    else if(a==2||a==1)
    {
    printf("Congratulations You won Rs.15");
    }
    else
    {
    printf("Sorry You don't won anithing");
    }
    }

  • @ghulamabbas6323
    @ghulamabbas6323 Před 29 dny

    Thanks 💗

  • @AapnaVlog49
    @AapnaVlog49 Před rokem +1

    with the flow chart kindly teach us about the algorithms

  • @kevinlambor5589
    @kevinlambor5589 Před 3 lety +78

    I am a 13y/o but still I am able to learn C from this playlist of code with harry. Thanks😄

  • @sujaldubey6936
    @sujaldubey6936 Před 2 lety +5

    Challenge accepted 👍
    Tried but failed but learned from it

  • @chiteez_____1562
    @chiteez_____1562 Před 9 měsíci

    Very nice tutorial 😃😄♥👍

  • @PriyaGupta-sg4sm
    @PriyaGupta-sg4sm Před rokem +7

    I was worried because I couldn't write a program which takes values from the user with code runner extension, and I thought there must be some problem while it was installed. But in this video i got to know that we have to change the settings in order to run it LMAO.

  • @engineerbhai7642
    @engineerbhai7642 Před 5 lety +3

    Bestcoder in you tube

  • @phoenixarts486
    @phoenixarts486 Před 4 lety +6

    Sir please explain string functions , it is very confusing part.

  • @Gayatri_shejule
    @Gayatri_shejule Před 10 měsíci

    Thank you sir 🥰🥰

  • @awaisabdullah7501
    @awaisabdullah7501 Před 4 lety +3

    your way of teaching is awesome ,.....love from Pak.

  • @_DhritikaDeka
    @_DhritikaDeka Před 3 lety +6

    sir can you give me the link for the solution video of today`s excercise?

  • @fit_tubes_365
    @fit_tubes_365 Před 2 lety

    ThankYou!

  • @Tradewithbrain567
    @Tradewithbrain567 Před rokem

    13.50 very important setting for me in vs code. and quiz challenge accepted.

  • @GoldyKumari-ky4bk
    @GoldyKumari-ky4bk Před 2 lety +12

    include
    int main()
    { int num;
    printf("enter the number");
    scanf("%d",&num);
    if(num==50)
    {
    printf("number is equal to 50");
    }
    else if(num >= 50)
    {
    printf("number is greater than 50");
    }
    else (num

    • @shivanipatwa4709
      @shivanipatwa4709 Před 7 měsíci

      cant we direct write name of the subject like maths and science And code like this....
      #include
      int main ()
      {
      int maths , science;
      printf("enter the name of subject you passed b/w maths and science");
      scanf("%d %d" , &maths ,&science);
      if (maths && science)
      {
      printf(" you have awarded gift of 45 rupees");
      }
      else if (maths)
      {
      printf("you have awarded gift of 15 rupees ");
      }
      else (science)
      {
      printf("you have awarded gift of 15 rupees");
      }
      return 0;
      }

  • @Ammarkoka
    @Ammarkoka Před 4 lety +6

    Challenge accepted! Bro little bit of errors but finally i solved it 😍🔥

    • @anujagnihotri02
      @anujagnihotri02 Před 3 lety

      Show me answer

    • @Ammarkoka
      @Ammarkoka Před 3 lety +2

      @@anujagnihotri02 bhai 8 months phle ka code raha hai kabhi kisi ke pass? Now i m dirty my hands on python and ML

    • @anujagnihotri02
      @anujagnihotri02 Před 3 lety

      Ha yaar ye to maine dekha hai tumhara comment bhi 8 months pahle ka hai

    • @anujagnihotri02
      @anujagnihotri02 Před 3 lety +1

      @@Ammarkoka wo kya hai na maine bahut kosis kiya par aaya nhi to socha tumhe bolu

  • @debarghyaroy4722
    @debarghyaroy4722 Před 3 měsíci

    excellent

  • @shaikrohith6988
    @shaikrohith6988 Před rokem +4

    challenge accepted and successfully completed program

  • @prachi8225
    @prachi8225 Před 3 lety +4

    printf("Harry is rocking 🔥🔥");

  • @ankitkumar-py3bv
    @ankitkumar-py3bv Před rokem

    Accepted and done👍

  • @priteshkchoughule5748

    Thank You

  • @varunsharma2108
    @varunsharma2108 Před 4 lety +8

    Challenge was good took me 10 min and tried 3 different approaches but finally it compiled and run ❤️❤️❤️

  • @dharmikgohel2663
    @dharmikgohel2663 Před 3 lety +11

    The best moment is 22:34

  • @NaachMore
    @NaachMore Před 8 měsíci

    #include
    int main() {
    int a;
    printf("1 means passed in maths or science
    2 means passed in both
    3 means failed");
    printf("
    Enter:");
    scanf("%d",&a);
    if (a==1) {
    printf("prize is 15");
    }
    else if (a==2) {
    printf("prize is 45");
    }
    else {
    printf ("failed");

    }
    return 0;
    }

  • @Legendaryshort
    @Legendaryshort Před rokem +7

    The code :-
    #include
    int main(){
    int subject;
    //1 use for science
    //2 use for math
    //3 use for science math
    printf("choose 1 for science, 2 for math, and 3 for science-math
    ");
    printf ("enter your subject code you have passed
    ");
    scanf("%d
    ",&subject);
    if (subject==1){
    printf("you got 15 rupees");
    }
    else if (subject==2){
    printf("you got 20 rupees");
    }
    else if (subject== 3){
    printf("you got 45 rupees");
    }
    else{
    printf("you entered wrong subject code");
    }
    }

    • @allrounderboy905
      @allrounderboy905 Před rokem +1

      Mera
      Scanf("%d
      ", &subject) ;
      %d
      percent d ke sath backslash n lagane par jab terminal me 1 type kar raha hu to wo kaam nahi kar raha hai.

    • @chayandas8204
      @chayandas8204 Před rokem

      wrong

    • @shubhamnarkhede2247
      @shubhamnarkhede2247 Před 10 měsíci

      @@allrounderboy905 scanf(%d, &subject);----- scanf main backslash n lagane ki jarurat nahi hain

  • @shubham_skadam
    @shubham_skadam Před 4 lety +6

    Hey harry, which theme are you using in visual studio? (Specific theme)

  • @sahithyavadiyala1962
    @sahithyavadiyala1962 Před 4 lety +7

    Sir can you please give the program that you gave as assignment??

  • @adityapareek_
    @adityapareek_ Před 3 měsíci +2

    Challenge accepted!!

  • @akanshisingh2119
    @akanshisingh2119 Před 7 měsíci +1

    sir in the assignment theres a question
    write a program to find wheth a student is pass or fail, if it requires total of 40 percent and at least 30 percent in each sub to pass. assume 3 sub and take marks as an input from the user
    #include
    int main()
    {
    int a,b,c,i,j;
    scanf("%d %d %d",&a, &b, &c);
    printf("Enter a: %d
    ", a);
    if (a>33)
    {
    printf("You are pass in the sub %d
    ", a);
    }
    else {
    printf("You are fail in the sub
    ");
    }
    printf("Enter b: %d
    ", b);
    if (b>33)
    {
    printf("You are pass in the sub %d
    ", b);
    }
    else {
    printf("You are fail in the sub/n");
    }
    printf("Enter c: %d
    ", c);
    if (c>33)
    {
    printf("You are pass in the sub %d
    ", c);
    }
    else {
    printf("You are fail in the sub
    ");
    }
    i = (a+b+c);
    scanf("%d", &i);
    j = i/300;
    scanf("%d", &j);
    printf("your total score is:%d", j);
    if (j>40)
    {
    printf("You are pass %d", j);
    }
    else {
    printf("You are fail");
    }
    return 0;
    }
    can u pls help me with correcting the code?

  • @rahulgoswami521
    @rahulgoswami521 Před 2 lety +3

    Challenge accepted and done in 5 min
    Thank you sir for guuidence

    • @shilajito.p.9639
      @shilajito.p.9639 Před rokem

      Bhai kaise kiya plz help mee

    • @rahulgoswami521
      @rahulgoswami521 Před rokem

      @@shilajito.p.9639
      #include
      int main()
      {
      int marks;
      printf("Enter 0 for both science and math, 1 for science ,2 for maths
      ");
      printf("Enter by no. which exams you pass : ");
      scanf("%d",&marks);
      if(marks==0){
      printf("Congratulation you passed 2 subject & Your gift will be 45 $");
      }
      else if(marks==1){
      printf("You passed science & Your gift will be 15 $");
      }
      else if(marks==2){
      printf("You passed math & Your gift will be 15 $");
      }
      else{
      printf("Wrong input! no data available");
      }
      return 0;
      }

    • @shilajito.p.9639
      @shilajito.p.9639 Před rokem

      Thnx bro

  • @riyasinghbaghel4537
    @riyasinghbaghel4537 Před 3 lety +3

    👍🏻 accepted