C_31 Switch Statement In C | C Programming Tutorials

  Рет қаралды 317,871

Jenny's Lectures CS IT

Jenny's Lectures CS IT

Күн бұрын

In this video, I have discussed the Switch Case in C with a flowchart and program.
Best C Programming Tutorials : • Programming in C
*******************************************
Connect & Contact Me:
My Second Channel Link: bit.ly/354n7C7
Facebook: / jennys-lectures-csit-n...
Quora: www.quora.com/...
Instagram: / jayantikhatrilamba
Twitter: / khatrijenny
*********************************************
More Playlists:
C++ Programming Tutorials: • Lec 1: How to Install ...
Placement Series: • Placements Series
Data Structures and Algorithms: https: • Data Structures and Al...
Design and Analysis of Algorithms(DAA): • Design and Analysis of...
Python Full Course: • Python - Basic to Advance
Printing Pattern in C: • Printing Pattern Progr...
Dynamic Programming: • Dynamic Programming
Operating Systems: // • Operating Systems
DBMS: • DBMS (Database Managem...
#cprogramming #jennyslectures #programming #clanguage #switchcase

Пікірлер: 407
@Rakshith_._247
@Rakshith_._247 4 жыл бұрын
This ma'am is the best. She does so much for us. Love to her and her family and the little one.
@ravindrakumawat3826
@ravindrakumawat3826 2 жыл бұрын
Little one means ??? Kid h mam k??
@ultranoobcodm
@ultranoobcodm Жыл бұрын
lol little one , as if you are the father
@Sourabh2208
@Sourabh2208 Жыл бұрын
#include main() { int marks; printf("Enter marks "); scanf("%d",&marks); switch (marks/10) { case 10: case 9: case 8: printf("Grade A"); break; case 7: printf("Grade B"); break; case 6: printf("Grade C"); break; default: printf("Grade D"); } }
@p.pardhu_akhil
@p.pardhu_akhil 9 ай бұрын
That's wrong program, when you try to enter the marks. 9 the output is coming great d. here is the correct program;--- #include int main() { int a; printf("Enter a value:"); scanf("%d",&a); switch (a) { case 10: case 9: case 8: printf("Grade A"); break; case 7: printf("Grade B"); break; case 6: printf("Grade C"); break; default: printf("Grade D"); } return 0; } mam pls check and tell... tq..
@venugopalala
@venugopalala 9 ай бұрын
Both are correct 1 st code marks for 100 i.e;user would have to enter marks for 100 2nd code marks for 10 i.e; user would have to enter marks for 10
@monikagarg5192
@monikagarg5192 4 ай бұрын
1st one is correct because she asked the program for the previous given program i.e. checks marks if greater than 80 and so on
@nitish2001nb
@nitish2001nb 4 жыл бұрын
i know it's very difficult to make videos daily along with family and explain topics in detail thank you mam for making these videos i mean all of them that u made 🙏🙏🙏🙏 🙇🙇🙇🙇 i didn't go to a good college but i found a teacher like you now i can learn all the concepts from your KZbin channel🙏🙏
@atilla6013
@atilla6013 2 жыл бұрын
#include int main() { int marks; printf("Enter the marks out of 100 "); scanf("%d",&marks); switch(marks/10) { case 10: case 9: case 8: printf("your grade is A"); break; case 7: printf("Your grade is B"); break; case 6: printf("Your grade is c"); break; default: printf("your grade is d"); } return 0; }
@Shreyas_K1044
@Shreyas_K1044 2 жыл бұрын
marks/100 should be their in the place of expression
@pegasusboss5672
@pegasusboss5672 2 жыл бұрын
@@Shreyas_K1044 then it will show only default ...
@leelasaikrish1966
@leelasaikrish1966 2 жыл бұрын
Bro in case of 80 marks it have to print 'B' grade but according to your program it is printing 'A' grade
@Trupti1991
@Trupti1991 2 жыл бұрын
@@leelasaikrish1966 IT DOESNT MATTER ,,, LOGIC MATTERS ,,,, AND LOGIC IS TRUE...@attila6013
@Trupti1991
@Trupti1991 2 жыл бұрын
👍👍 true and logical it works
@subhadeepbose4610
@subhadeepbose4610 10 ай бұрын
I watch your lectures and I try the programs by myself and I really get happy when I pass. I understand your lectures so well.
@gopalchaudhary6170
@gopalchaudhary6170 2 жыл бұрын
One of the best series of programming in C language ❤️❤️❤️❤️
@balkrishnabane1392
@balkrishnabane1392 2 жыл бұрын
23:40 #include #include int main() { int marks; printf("Enter your marks: "); scanf("%d", &marks); switch(marks){ case 80 ... 100: printf("Grade A ", marks); break; case 70 ... 79: printf("Grade B ", marks); break; case 60 ... 69: printf("Grade C ", marks); break; case 35 ... 59: printf("Grade D ", marks); break; default: printf("You are failed "); } printf("Statement X "); return 0; }
@madhavan.1209
@madhavan.1209 2 жыл бұрын
super vroo 👏👏👏
@jyotidalavi9298
@jyotidalavi9298 2 жыл бұрын
👍
@bhukyabhanuprasad
@bhukyabhanuprasad Жыл бұрын
Why did you used the 3 dots in between 70 and 79 ?
@devSackey
@devSackey Жыл бұрын
@@bhukyabhanuprasad The "..." is called the range operator in C and is used to specify a continuous range of values. In this particular case, "case 80 ... 100" indicates that the code block following it will be executed if the expression being evaluated falls within the range from 80 to 100 (inclusive).
@cruelgaming8538
@cruelgaming8538 Жыл бұрын
@@devSackey thanks isaac
@oppositelyharish947
@oppositelyharish947 3 жыл бұрын
How many members are skipping unacademy add
@snehakumari-ou9cn
@snehakumari-ou9cn Жыл бұрын
Add --ad
@jagdeepsahEngineering
@jagdeepsahEngineering Жыл бұрын
❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤
@dombogamer97
@dombogamer97 4 ай бұрын
KZbin premium user
@prathameshgarade1919
@prathameshgarade1919 3 жыл бұрын
Mam I am fresher and I can understand teaching of only you but not of my college Teachers so thank you so much mam 💓
@tech3047
@tech3047 3 жыл бұрын
Mam you have been helping me too much with your videos. The way you explain is very easy to understand i have only to say thank and ask you please don't stop making video such that, you may not know but your videos are very useful for us. by the way i am from Mozambique
@aHumbleER
@aHumbleER 3 жыл бұрын
All the solutions of Let Us C book exercise are explained here:: kzbin.info/aero/PLa86zDUJh7Hd-dpKArE1L9UWBEGKkRTdb
@madhumalipremarathna3038
@madhumalipremarathna3038 4 жыл бұрын
23:40 void main() { int marks ; printf("Enter marksbetween 0 to 100 : ") ; scanf("%d" , &marks) ; switch(marks/10) { case 10 : case 9 : case 8 : printf(" Your grade is A") ; break ; case 7 : printf(" Your grade is B") ; break ; case 6 : printf(" Your grade is C") ; break ; default : printf(" Your grade is D") ; } getch() ; }
@gvincent3246
@gvincent3246 3 жыл бұрын
Why getch()
@madhumalipremarathna3038
@madhumalipremarathna3038 3 жыл бұрын
@@gvincent3246 to hold the screen
@asifiqbalsekh
@asifiqbalsekh 3 жыл бұрын
Yeh Badiya Tha Guru....!
@manoj3197
@manoj3197 3 жыл бұрын
@@praveenkumarp7150 it won't show error because he had given int not float so it will print only integer not decimal values
@kunalbhagat5214
@kunalbhagat5214 3 жыл бұрын
No
@NataliaArain
@NataliaArain Ай бұрын
Mam your way of teaching is just👏🔥 I can thankful to you from the depth of my heart❤
@Rishithabajjuri
@Rishithabajjuri 2 жыл бұрын
Excellent teaching skills u have mam that is understanding by everyone ❤️😍😍😍
@parthshroff7357
@parthshroff7357 Жыл бұрын
22:09 code ↓ #include int main(){ int marks; printf("please enter your marks "); scanf("%d",&marks); switch(marks/10){ case 10: case 9: case 8: printf("you have got a A grade"); break; case 7:printf("you have got a B grade"); break; case 6:printf("you have got a C grade"); break; default:printf("you have got a D grade"); } return 0; }
@Nithya.899
@Nithya.899 Жыл бұрын
We need to be very thankful to u mam ur lectures helped us a lot by gaining lots of knowledge on c language 🎉
@DailyComedi
@DailyComedi Жыл бұрын
I love you, ma'am, your teaching style is wonderful.
@Mr.Yaragonda
@Mr.Yaragonda 4 жыл бұрын
I love❤ this Sessions....... Thank you❤🌹 so much madam from bottom of my heart💖....... You are the only one in KZbin▶️i always waiting⏳ for ur videos madam......... Ur hardworking never wastes😇....... My education🎓 is dedicated always for you mam🙃🥰
@aryanshivamiitmentors
@aryanshivamiitmentors Жыл бұрын
YOUR TEACHIN STYLE IS WONDERFULL MA'M
@khushijain3574
@khushijain3574 3 жыл бұрын
maam please keep making videos and guiding us u are my only hope because only your lectures are understandable by me
@SHREYASH1220
@SHREYASH1220 Жыл бұрын
If you are our cs teacher I come even sunday to class.
@sbepari79
@sbepari79 4 жыл бұрын
Once this is finished can help us to create a live project using c++/c language it will help us for better understanding 🙏🏻
@iramshehzadi9215
@iramshehzadi9215 4 жыл бұрын
Thanks a lot ma'm ap ny c start kar di Really bundles of thanks. Ap ny dda start ki thi to mujhy lga c language skip kar di ap ny ab nhi parhaen gi Again Thanks
@sirajunissa4276
@sirajunissa4276 Жыл бұрын
Ur explaining way Is just amazing. it helped me a lot in my studies
@fansbilever9676
@fansbilever9676 4 жыл бұрын
Thank you mam .. You are a god gift to me... For cs tq mam
@Ms_zeezah
@Ms_zeezah Жыл бұрын
wow, i really love this particular session Thanks for the impact ma, you even explained much better than my lecturer, this will really help me in my forthcoming exam
@GIVEN_U
@GIVEN_U Жыл бұрын
I am learning so much from my beautiful teacher! Great video Ma!
@gurupranith9167
@gurupranith9167 11 ай бұрын
Thank u so much mam I understood clearly 🙏🙏
@isaac-victorshonowo1838
@isaac-victorshonowo1838 Жыл бұрын
Watched and Understood ❤
@MIbrahim-b3j
@MIbrahim-b3j Жыл бұрын
int main() { int marks; coutmarks; switch (marks) { case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: cout
@a_yucodes9625
@a_yucodes9625 3 жыл бұрын
Really your all lecture are superb nd it helps more nd more to learn any concept in depth 👍👍so we thanks to you for making free content like this ❤️ But only one think is you miss that iss captions
@Cute-892
@Cute-892 6 ай бұрын
Very Well Explained Lectures Thank Uh Mam❤
@maheshkanneboina3856
@maheshkanneboina3856 2 жыл бұрын
Love you Jenny😍😍😍
@manirulmolla6105
@manirulmolla6105 2 жыл бұрын
#include int main() { int Marks; printf("Please enter the marks out of 90 "); scanf("%d", &Marks); switch(Marks) { case 61: case 62: case 63: case 64: case 65: case 66: case 67: case 68: case 69: case 70: printf("Your grade is C"); break; case 71: case 72: case 33: case 74: case 75: case 76: case 77: case 78: case 79: case 80: printf("Your grade is B"); break; case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: printf("Your grade is A"); break; default: printf("Your grade is D"); } return 0; }
@Rohit-mt5oh
@Rohit-mt5oh 2 жыл бұрын
Plz what would be the output
@manirulmolla6105
@manirulmolla6105 2 жыл бұрын
@@Rohit-mt5oh Firts it will print "Please enter the marks out of 90" and As scanf function is used , it will ask for the input. If the inputed number is from 61 to 70 then output will be "Your grade is C", if input is from 71 to 80 then output will be "Your grade is B", if input is from 81 to 90 then output will be "Your grade is A". But if the inputted number is not within 61 to 90 then out put will be "Your grade is D".
@shinyrao2786
@shinyrao2786 3 жыл бұрын
U re really an extraordinary teacher ....🥰😍
@Adityakumar-dl4vc
@Adityakumar-dl4vc Жыл бұрын
Now I understand switch case thanks a lot mam
@veerabhadrarao258
@veerabhadrarao258 2 жыл бұрын
Tq, u r giving complete crystal clear information.. 🙏
@jeanrioux8750
@jeanrioux8750 2 жыл бұрын
Here is my program. It satisfies all the cases. int marks; printf("enter marks:"); scanf("%d",&marks); if (marks % 10 == 0) // If marks multiple of 10, then remove 1 from the marks. If you need to print the marks, use another variable to keep track of the real marks. marks = marks - 1; switch (marks/10) { case 10: case 9: case 8: printf("grade A"); break; case 7: printf("grade B"); break; case 6: printf("grade C"); break; default: printf("grade D"); }
@thilakparamasivan8409
@thilakparamasivan8409 2 жыл бұрын
Great thinking
@Mahipal_Official
@Mahipal_Official 2 жыл бұрын
#include void main() { int marks; printf("enter your marks between 0 to 100:"); scanf("%d",&marks); switch(marks/10) { case 10: printf("grade is a") ; break; case 9: printf("grade is b"); break; case 8: printf("grade is c"); break; case 7: printf("grade is d"); break; case 6: printf("grade is e"); break; default: printf("fail"); break; } }
@ahmedhesain4271
@ahmedhesain4271 2 жыл бұрын
Brilliant code
@vigashiniammu1637
@vigashiniammu1637 3 жыл бұрын
After this c programming, kindly post videos on python programming also mam. As I understand clearly if you teach❤️❤️
@smrutiranjanswain1700
@smrutiranjanswain1700 2 жыл бұрын
Have you cleared the 'c' language?
@disciplined469
@disciplined469 2 жыл бұрын
Hii you are damn cute 💖
@JyothiD-k2d
@JyothiD-k2d Жыл бұрын
Your teaching is so good
@HamzaKhan-ei9op
@HamzaKhan-ei9op Жыл бұрын
A thankful video 🥰😘
@anandiam334
@anandiam334 4 жыл бұрын
Love u so much mam 💞 ( only in subject aspect )
@surendrasmiley3487
@surendrasmiley3487 3 жыл бұрын
😂😂
@vedantchaudhari7903
@vedantchaudhari7903 3 жыл бұрын
😹😹😹
@14thviking34
@14thviking34 2 жыл бұрын
The teaching in the video is wonderful and mam you are looking beautiful
@NikhilSarnaik-z5k
@NikhilSarnaik-z5k Жыл бұрын
int marks; printf("Enter the marks : "); scanf("%d", &marks); char ch = marks > 80 ? 'A' : marks > 70 ? 'B' : marks > 60 ? 'C' : 'D'; switch (ch) { case 'A': printf("Grade A"); break; case 'B': printf("Grade B"); break; case 'C': printf("Grade C"); break; default : printf("Grade D"); }
@TechDelay
@TechDelay 3 жыл бұрын
Perfect Explaination
@sarikapardeshi794
@sarikapardeshi794 3 жыл бұрын
Thank you so much mam...I understood it very clearly...🙏👍👍😇
@RanDomOneZzz
@RanDomOneZzz Жыл бұрын
This the tested code. #include void main() { int marks; printf("Enter your marks: "); scanf("%d",&marks); switch(marks) { case 80 ... 100: printf("Your grade is A for marks %d",marks); break; case 70 ... 79: printf("Your grade is B for marks %d",marks); break; case 60 ... 69: printf("Your grade is C for marks %d",marks); break; case 50 ... 59: printf("Your grade is D for marks %d",marks); break; default: printf("Your grade is E for marks %d",marks); } }
@himanshu-x8s6b
@himanshu-x8s6b 3 ай бұрын
awesome lecture mam thank you
@premraj1456
@premraj1456 4 жыл бұрын
Mam ek dam accha se samaj aa gya switch in c
@For_tx78
@For_tx78 2 жыл бұрын
jenny you are very much great
@hiriharanvm5568
@hiriharanvm5568 9 ай бұрын
#include int main() { int mark; printf("Enter values"); scanf("%d",&mark); switch(mark/10) { case 10: case 9: case 8: printf("A"); break; case 7: printf("B"); break; case 6:printf("C"); break; default:printf("D"); } }
@shivamrajput2157
@shivamrajput2157 4 жыл бұрын
Ma'am please finish this course as fast as possible I have a exam in next month
@Mr.Yaragonda
@Mr.Yaragonda 4 жыл бұрын
Same mam..... Please complete ....
@rajjoshi3215
@rajjoshi3215 4 жыл бұрын
code with harry sa kar la bro
@arjunm7864
@arjunm7864 Жыл бұрын
#include Int main() { Int marks; Print("enter the marks"); Scanf("%d",&marks); Switch(marks) { Case(80to100): Printf("a grade"); Break; Case(70to80): Printf("b grade"); break; Case(50to70): Printf("c grade"); Break; Case(below 40): Printf("d grade"); Break; Case: Printf("not grade"); Break; } return 0; }
@riteshkumar9231
@riteshkumar9231 3 жыл бұрын
super video mam
@uttejtg38
@uttejtg38 4 жыл бұрын
Mam start c++ as next course 🙏🙏🙏🙏🙏🙏🙏
@aniketh4606
@aniketh4606 3 жыл бұрын
#include int main() { int cg, phy, chem, math; printf("enter the marks of all the subjects, in the order phy,chem,math "); scanf("%d%d%d", &phy, &chem, &math); cg = (phy + chem + math) / 30; //for cgpa we divide the percentage by 10 and for percentage (obtained marks by 300)*100. switch (cg) { case 10: case 9: case 8: printf("first class"); break; case 7: case 6: printf("second class"); break; case 5: printf("third class"); break; default: printf("fail"); break; } printf(" congrats"); return 0; } thank you, ma'am
@TastyTales1098
@TastyTales1098 Жыл бұрын
really such a great teacher god bless you🥰🥰
@lakshmipriyanka4490
@lakshmipriyanka4490 3 жыл бұрын
Thank you so much❤ mam🤗
@aumprakashdas7223
@aumprakashdas7223 3 жыл бұрын
Void main() : char ch; Printf("entre grade") Scanf("%d" &char?) Switch(ch) Case_A:printf(greater than 80) break; Case_B:printf (greater than 70) Break; Case_C:printf(graeter than 60) Break; Defult printf (
@SarangaE-gv5hf
@SarangaE-gv5hf 3 жыл бұрын
this shows your coding skills brother
@dharanisenthilkumar3904
@dharanisenthilkumar3904 3 жыл бұрын
Can you explain the program
@dominicamaria2897
@dominicamaria2897 3 жыл бұрын
Hello But madam asked to do it reverse right🤔🤔
@Dani_650
@Dani_650 3 жыл бұрын
You much get marks as input rite?
@tarunpotnuru2900
@tarunpotnuru2900 3 жыл бұрын
%c is used in place of%d
@uday_vlog9
@uday_vlog9 Жыл бұрын
😇Why i am smiling unconditionally when you smile 😊
@vivekreddy111
@vivekreddy111 Жыл бұрын
#include void main() { int marks,value; printf("enter the marks "); scanf("%d",&marks); if(marks>80) value=1; else if(marks>60) value=2; else if(marks>40) value=3; switch(value) { case 1: printf("the grade is A"); break; case 2: printf("the grade is B"); break; case 3: printf("the grade is C "); break; default: printf("fail"); } }
@codingkart245
@codingkart245 4 жыл бұрын
i learnt till arrays, im waiting for you to reach till there
@Prince_D_Coder
@Prince_D_Coder Жыл бұрын
#include int main() { int grade; printf("Welcome user students "); printf ("Enter number: "); scanf("%d", &grade); switch (grade) { case 81 ... 100: printf("Your current grade is A "); break; case 71 ... 80: printf("Your current grade is B "); break; case 61 ... 70: printf("Your current grade is C "); break; default: printf("Your grade is D "); break; } return 0; }
@tps8470
@tps8470 2 жыл бұрын
Thank You Mam #include int main(){ int marks; printf("Enter your marks "); scanf("%d", &marks); switch(marks/10) { case 10: case 9: case 8: printf("Grade is A "); break; case 7: printf("Grade is B "); break; case 6: printf("Grade is C "); break; case 5: printf("Grade is D "); break; default: printf("Fail "); break; } return 0; }
@akshaydodamani7265
@akshaydodamani7265 2 жыл бұрын
Does default have break..?🤔
@ananyaghosh6402
@ananyaghosh6402 2 жыл бұрын
@@akshaydodamani7265 not necessarily
@laithwmaboro8597
@laithwmaboro8597 2 жыл бұрын
Thank you very much ma'am for making this video. It helped me lot in my exam.❤❤
@swapniljadhav9494
@swapniljadhav9494 3 жыл бұрын
Ans of this question 23:28 #include #include int main() { int score; printf("Enter your marks out of 100 "); scanf("%d",&score); switch(score/10) { case 10: case 9: printf("Grade A"); break; case 8: printf("Grade B"); break; case 7: printf("Grade C"); break; case 6: printf("Grade D"); break; case 5: case 4: printf("Grade E"); break; default: printf("Unfortunatly FAIL..!"); } getch(); }
@ragineetripathi2464
@ragineetripathi2464 3 жыл бұрын
Thank you for the code👍
@Anjumv9995
@Anjumv9995 3 жыл бұрын
But what if the entered mark is any number from 81 to 89🤔. It is also greater than 80 and grade should be 'A' as per the question.
@sabyasputnik_2004
@sabyasputnik_2004 Жыл бұрын
3:33 integral type evaluation of switch statement
@walkwithme_P62
@walkwithme_P62 3 жыл бұрын
#include #include Void main() { Int marks; Printf ("enter th Mark's"); Scand("%d",& Marks); Switch(marks) { Case '90': Printf (" A grade"); break; Case '80': Printf(" B grade"); break; Case ' 70': Printf ("C grade"); Break; Case '60': Printf(" D grade"); Break; Case '50' : Printf(" just passed"); Break; Default: Printf (" the student fail" ); } Getch(); }
@vlogylog8573
@vlogylog8573 3 жыл бұрын
This is wrong
@walkwithme_P62
@walkwithme_P62 3 жыл бұрын
Where it is wrong Can u explain
@dominicamaria2897
@dominicamaria2897 3 жыл бұрын
What if I enter 87? Will it show fail?
@beknowledgeable5558
@beknowledgeable5558 3 жыл бұрын
Yes brother ...you wrote ...the header file studio but it is stdio and that is not mark's that is marks and you wrote the default value also wrong ... because if we write any number rather than the given one...suppose if we enter 77 so will it show ... student is fail...no ok ☺️
@walkwithme_P62
@walkwithme_P62 3 жыл бұрын
@@beknowledgeable5558 Yes bro Ur right
@munavarahameed3695
@munavarahameed3695 3 жыл бұрын
super teacher
@praveenthammishetti6342
@praveenthammishetti6342 7 ай бұрын
#include void main() { int marks; printf("Enter your marks"); scanf("%d",&marks); switch(marks) { case 90: case 80: case 70: printf("A grade"); break; case 60: case 50: printf("B grade"); break; case 40: printf("C grade"); break; default:printf("D grade"); break; printf("All the best"); } }
@t.c.v.vbhaskar3695
@t.c.v.vbhaskar3695 2 жыл бұрын
int marks; printf("enter marks ="); scanf ("%d",& marks); switch (marks) { case 80: printf ("Grade A"); break; case 70 : printf ("Grade B "); break; case 60: printf ("Grade c "); break ; default: printf ("Grade D "); } printf (" work hard key to sucesss);
@akash2626.-
@akash2626.- 2 жыл бұрын
you are amazing maam
@tsutharsan4392
@tsutharsan4392 2 жыл бұрын
#include #include int main() { int mark; scanf("%d",&mark); switch((mark-1)/10) { case 9: case 8: printf("A"); break; case 7: printf("B"); break; case 6: printf("C"); break; default: printf("D"); } getch(); return 0; }
@Sathvika-0026
@Sathvika-0026 Жыл бұрын
hi , why is it mark - 1 /10 and not mark /10 ??
@KrishnaKumar-b4m9p
@KrishnaKumar-b4m9p Жыл бұрын
@@Sathvika-0026 hi sathvika out of all the codes in comment section this one is absolutely correct. now lets explain your doubt. see a student is getting grade A only when his/her marks is greater than 80 ( this means if a student get 80 marks he will get grade B). . FOR all the input greater than 80 marks your logic of marks/10 will work but if we input exact 80 as input in that case also we will get 80/10= 8 and because of that student will be alloted grade A instead of B . so to avoid this we are subtracting 1 from input marks and then after dividing by 10 we will get 8 and 9 for the input greater than 80 and 7 for input greater than 70 and 6 for input greater than 60. hope it helps.feel free to ask further. btw im also learning c.
@chiara-md9cn
@chiara-md9cn 3 жыл бұрын
Mam how to print when condition is >=360-firstclass >=250-secondclass Other wise third class mam Pls just give me a hint mam..
@nusrathussain3139
@nusrathussain3139 2 жыл бұрын
Good explanation of Switch statement
@KumaEdecha
@KumaEdecha 8 ай бұрын
thank you very much mam you're smart c++ next please
@yallamandap
@yallamandap 2 жыл бұрын
madam excelent ur lectures and u r also so beautiful....tq madam.
@continnum_radhe-radhe
@continnum_radhe-radhe 2 жыл бұрын
Thank you so much mam 🔥🔥🔥
@gullanagamani5497
@gullanagamani5497 20 күн бұрын
Madam in case >80 we should not write
@mdhaidarparwez968
@mdhaidarparwez968 2 жыл бұрын
So nice explanation.
@pravinj2017
@pravinj2017 4 жыл бұрын
int marks; printf(" marks:"); scanf("%d",&marks); switch(marks/10) { case 8: printf("grade A"); break; case 7: printf("grade B"); break; case 6: printf("grade C"); break; default: printf("grade D"); }
@akashsahaks
@akashsahaks 4 жыл бұрын
amazing, Yaar 30 min se idhr udhr kr rha tha mujhe lgs solve na hoga hmse but after you, smjh aa gya.. ye grade wala .. Thanks a lot
@ruthtef4227
@ruthtef4227 4 жыл бұрын
wondering if this works, I didn't try it yet switch (true) { case (mark > 80): alert("Grade A"); break; case (mark > 70): alert("Grade B"); break; case (mark > 60): alert("Grade c"); break; default: alert("Grade B"); }
@shubhthearcher4088
@shubhthearcher4088 3 жыл бұрын
what if I enter 98.....it will give you D
@shubhthearcher4088
@shubhthearcher4088 3 жыл бұрын
@@ruthtef4227 condition not allow in case..
@akashsahaks
@akashsahaks 3 жыл бұрын
@@shubhthearcher4088 case 9 bna lo ho jayega...
@asapnino3625
@asapnino3625 Жыл бұрын
#include #include #include /* Assignment on printing out grades */ int main() { int a; printf("Enter score: "); scanf("%d", &a); switch(a) { case 80 ... 100: printf("grade is: A "); break; case 70 ... 79: printf("grade is: B. "); break; case 60 ... 69: printf("grade is: C. "); break; default: printf("grade is: D. "); } getch(); return (0); }
@mohithar1110
@mohithar1110 3 жыл бұрын
My army brain when she said jk 😂💜
@ashwaniverma5512
@ashwaniverma5512 4 жыл бұрын
Thanks a lot for your help 🔥👍
@suryanshmishra5262
@suryanshmishra5262 4 жыл бұрын
Thnku ma'am literally thnx!!
@rajveersinhgohil1108
@rajveersinhgohil1108 20 күн бұрын
Blue light glasses is good for eye? please answer
@NavyasriGuthi
@NavyasriGuthi 5 ай бұрын
Mam instead of writing the code on the board please show the execution then we will get clear idea about the topic
@Ashark866
@Ashark866 3 жыл бұрын
Will u please make a video on C++ programming also
@navneetrajthakur7606
@navneetrajthakur7606 2 жыл бұрын
You're an amazing teacher ma'am.your method of teaching helps to understand the topic very well.stay blessed always 🙏😊
@anju7334
@anju7334 3 жыл бұрын
Thankyou mam ❤️
@suchansenpai8341
@suchansenpai8341 Жыл бұрын
I just increase the workload i did it in the most inefficient way😢 but anyway this is how i did it #include #include void main() { int marks,ch; printf("Enter your marks:"); scanf("%d",&marks); if (marks>=80) ch=1; else if (marks>=60) ch=2; else if (marks>=50) ch=3; else if (marks>=30) ch=4; switch (ch) { case 1 : if (marks>=80) printf("Grade S"); break; case 2 : if (marks>=60) printf("Grade A"); break; case 3 : if (marks>=50) printf("Grade B"); break; case 4 : if (marks>=30) printf("Grade C"); break; default: printf("Grade D"); break; } getch(); }
@kishankumarpathak7022
@kishankumarpathak7022 4 жыл бұрын
I like your way of teaching maam thank u for spreading knowledge.
@satyajeetjadhav4932
@satyajeetjadhav4932 3 жыл бұрын
#include #include int main() { int marks; printf("enter the first number of your marks(suppose 89 then enter 8) you scored out of 100:"); scanf("%d",&marks); switch(marks) { case 9: printf("A garde"); break; case 8: printf("B garde"); break; case 7: printf("C grade"); break; case 6: printf("D garde"); break; default: printf("you are fail"); } return 0; }
@fredrickhagan4196
@fredrickhagan4196 2 жыл бұрын
hey Jenny, am confused here, am a beginner my Lecture gave me this assignment and don't understand anything. three different questions are; Research on switch statement Shortcut method Software development cycle.
@rit03a.navaneedhan80
@rit03a.navaneedhan80 3 жыл бұрын
// Online C compiler to run C program online #include int main() { int marks; printf (" enter your marks :"); scanf("%d",&marks); marks=marks/10; switch(marks) { case 10: case 9: case 8: printf ("A grade"); break; case 7: case 6: printf("B grade"); break; case 5: printf("C grade"); case 4: printf("D grade"); default : printf ("your fail better Hard work"); } printf (" hence its result"); return 0; }
@yokeshwerp6922
@yokeshwerp6922 4 жыл бұрын
Awesome mam
@nishikantalenka1251
@nishikantalenka1251 3 жыл бұрын
You are really superb mam
@Dshiva-pn9wu
@Dshiva-pn9wu 3 жыл бұрын
I love you ma'am
@koppuramulu7344
@koppuramulu7344 2 жыл бұрын
Mam in switch case why float values are not taking
C_32 C Program to make simple calculator using Switch Case | C Language Tutorials
15:02
C_30 else if ladder in C | C Programming Tutorials
13:53
Jenny's Lectures CS IT
Рет қаралды 193 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
C_33 Introduction to Loop in C Language | Need of loops| C Language Tutorials
15:55
5 Secrets to Stop Stuttering & Speak More Clearly!
12:44
Vinh Giang
Рет қаралды 142 М.
C_27 If Statement in C | C Programming Tutorials
20:56
Jenny's Lectures CS IT
Рет қаралды 442 М.
What is a semaphore? How do they work? (Example in C)
13:27
Jacob Sorber
Рет қаралды 321 М.
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 974 М.
#11: Switch Statement in C | C Programming for Beginners
11:10
Programiz
Рет қаралды 179 М.
C_37 While Loop in C (part-1) | C Language Tutorials
12:21
Jenny's Lectures CS IT
Рет қаралды 272 М.
C_29 Nested If in C | C Programming Tutorials
15:07
Jenny's Lectures CS IT
Рет қаралды 240 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН