No video

Special Programs in C − Pyramid of Stars

  Рет қаралды 860,338

Neso Academy

Neso Academy

Күн бұрын

C Programming & Data Structures: Special C Programs − Pyramid of Stars.
Topics discussed:
1) How to print a pyramid of stars using only for loops and if-else condition.
C Programming Lectures: goo.gl/7Eh2SS
Follow Neso Academy on Instagram: @nesoacademy(bit.ly/2XP63OE)
Follow me on Instagram: @jaspreetedu(bit.ly/2YX26E5)
Contribute: www.nesoacademy...
Memberships: bit.ly/2U7YSPI
Books: www.nesoacademy...
Website ► www.nesoacademy...
Forum ► forum.nesoacade...
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#CProgrammingByNeso #CProgramming #PyramidCProgram #PatternProgram

Пікірлер: 430
@nitins7103
@nitins7103 6 жыл бұрын
This tutorial is by far the best on the internet in solving the pyramid problems, so beautifully expressed. Thank you Neso Academy! Brilliant job
@SurajKumar-jx4zw
@SurajKumar-jx4zw 5 жыл бұрын
Bhai kabhi fursat mile to Saurav sukhla sir Ka video dekhna
@SaifCSE__
@SaifCSE__ 4 жыл бұрын
@@SurajKumar-jx4zw dekhkr idhr aaya hu bro Yaha depth mei smjhaya gya
@daverussell4052
@daverussell4052 3 жыл бұрын
@@tamil8198 maybe because you dont put the new line character?? like that cause printf wont automaticly put the character
@balakrishnabalu3035
@balakrishnabalu3035 2 жыл бұрын
@@SurajKumar-jx4zw rarattygg
@shashinegative9366
@shashinegative9366 2 жыл бұрын
if someone feel it dificult try this .... int main() { int total_rows; printf("enter the size of rows "); scanf("%d",&total_rows); for(int rows=1;rows
@rajcodes100
@rajcodes100 5 жыл бұрын
You have literally nailed this concept in true mathematical style - kudos to you sir.
@youhub1x
@youhub1x Жыл бұрын
Here we can write If( j > (n-i) && j < (n+i) ) Instead of If(j=n+(i-1))
@mayrah8813
@mayrah8813 3 жыл бұрын
My uni teacher just handed us a book and said good luck and gives us homework I always come here because you help so much more thank you. 🥰
@daytrade1013
@daytrade1013 4 жыл бұрын
It took me a few watches to fully comprehend this, but you are definitely the best at explaining code. I have watched used everything and everyone from freecodecamp and CS50(harvard) to Traversy and WesBos ... Best programming tutor out there .. not even close.. A+++++ thank you!
@rakeshgaddam5739
@rakeshgaddam5739 4 жыл бұрын
Sir,your explanation is so good that even high school student can also understand. Thankyou sir.
@rakeshgain5495
@rakeshgain5495 4 жыл бұрын
I am an Engineering Student and I found your way of teaching is best to understand all these concept. Excellent Sir !!
@RishiSingh-dj9ou
@RishiSingh-dj9ou 3 жыл бұрын
As a beginner i am watching this tutorial (jbki internet par phle se hi freshly prepared tutorials available h jo latest h )but even this content of neso is far far better than those latest tutorial.....❣️❣️❣️🤪🤪
@nesoacademy
@nesoacademy 3 жыл бұрын
Yes, latest has not much to do with these basic courses.
@iamDejaray1
@iamDejaray1 3 жыл бұрын
This man can really teach. No tutorials on KZfaq beats this, Yes!, None!
@Ankitkumar-bn2bs
@Ankitkumar-bn2bs 3 жыл бұрын
Hats off ! to your teaching style. Petition to bring your multiple copies into all the schools of India. 🙏
@IZALEXZ
@IZALEXZ Жыл бұрын
I rarely comment on anything and this is by far one one the most well made tutorials I have ever watched!
@justcaused6182
@justcaused6182 4 жыл бұрын
Dude, I usually don't like Indian tutorials, but damn, you are so understandable and you explain very well. I always skipped these kind of tasks because I never understood them. Now I'll never skip it!
@HarshaVardhan-kt5uu
@HarshaVardhan-kt5uu 3 жыл бұрын
which one u likes plz put link here so we can also watch
@laskdjf3880
@laskdjf3880 Жыл бұрын
u just did a racism 💀
@smritiyadav907
@smritiyadav907 Жыл бұрын
OMG This so fabulous .❣ I couldn't to resist my self for comment really the way you are expressing and solve the problems i think a small child can also understand. If all the teachers will taught like this then there will be no existence of mindless people in all over the world.🙇‍♀ THANK YOU SO MUCH SIR ! 🙌
@samrat9197
@samrat9197 3 жыл бұрын
this is one of the finest channel where you find all the stuff from basics to the in depth level that too for free this is far better than all those white hat jr.It really helped me a lot thank for the entire neso academy team
@vietnhatvo8345
@vietnhatvo8345 2 жыл бұрын
Thanks for the lesson Sir. I have another way to solve the problem as below: int main() { int n=0; printf("Input the number of row:"); scanf("%d", &n); for (int i = 1; i = 0; blankspace--) { printf(" "); } for (int star = 1; star < 2 * i; star++) { printf("*"); } printf(" "); } return 0; }
@straatvisser5038
@straatvisser5038 Жыл бұрын
Can you explain step by step? thanks
@devangihprajapati4162
@devangihprajapati4162 4 жыл бұрын
Sir you are teaching very nicely. Your teaching is outstanding and excellent.
@pritigohil777
@pritigohil777 Жыл бұрын
Amazing! The way you have simplified things is fantastic.
@enjoythemoment9107
@enjoythemoment9107 11 ай бұрын
Hi
@priyankapawar4789
@priyankapawar4789 5 жыл бұрын
Thank you for explaining with concept of matrix....clear view about the pyramid structure... thank you,
@alejguz1552
@alejguz1552 3 жыл бұрын
Bro, I wish I had this video 10 years ago when I took my first programming course.. very informative keep it up
@elianapathan2034
@elianapathan2034 3 жыл бұрын
Hey can you tell me how you build your own logic any tips please
@okkami676
@okkami676 2 жыл бұрын
This is by far the BEST EXPLANATION of the pyramid nested loop that I have seen. Thank you SO MUCH, SIR!
@sonalkamble2453
@sonalkamble2453 3 жыл бұрын
The code is incorrect... you need to initialize i and j =0. Also for the first for loop you need to put for(i =0; i < n; i++)
@anilkumargupta4894
@anilkumargupta4894 6 жыл бұрын
Clearity of concept of how matrix is used in coding ..... It make quest. Bit easier .😎
@swagatamchakraborty3352
@swagatamchakraborty3352 6 жыл бұрын
Excellent solution to this special problem of pyramid of stars! Truly speaking I have never seen such a simplified way of solving this kind of pattern programs. Excellent effort! Just keep it up Neso Academy! Looking forward to many such simplified solutions to other well known pattern programs.
@mounikaveeramreddy236
@mounikaveeramreddy236 5 жыл бұрын
Easiest logic to solve patterns... Thanks to neso academy
@Shanmukha19
@Shanmukha19 3 жыл бұрын
Hats off to your explanation. What a great lecture loved it. Thanks a lot.
@mercnem6855
@mercnem6855 4 жыл бұрын
Great explanation, but when explaining the placement of the stars shouldn't you have a " " line just outside of the second loop? When running as is, all four stars are on the same row.
@gargimohanty955
@gargimohanty955 2 жыл бұрын
exactly!
@vikaspanchal6628
@vikaspanchal6628 2 жыл бұрын
Yes, how to resolve this
@gargimohanty955
@gargimohanty955 2 жыл бұрын
@@vikaspanchal6628 there are two loops right ? So you have to place the printf(" "); out of the second loop but inside the first loop. And everything else will stay the same.
@carnage_wolfiger
@carnage_wolfiger 5 ай бұрын
I was going to reply. But when I saw this comment in 3 yr old 💀. btw 10:18 here you can see
@ashwinivaidya4183
@ashwinivaidya4183 Жыл бұрын
In my engg career, after paying to many institute and coching center finally now from Neso academy i got to know and understood better than any of these ... That too free of cost ... Thank you ❤️❤️💯💯
@pravinnaga3524
@pravinnaga3524 5 жыл бұрын
Wowwww 😻😻😍 explained neatly nd clearly the concept !! 🖤😍💯😄
@excitedbox5705
@excitedbox5705 4 жыл бұрын
You could also print n-(i+1) spaces and print i+n-spaces stars. And increment i. That way you can use a for loops like you use in your first example. First you have 4-1 so print 3 spaces and 4-3 spaces is 1 star. Increment i to 1 and you have 4-2 so print 2 spaces and n+1 is 5, -2 spaces is 3 stars. increment i again and so on.
@yaswanthkosuru
@yaswanthkosuru Жыл бұрын
really amazing finally i tried a another approach
@AkashR4J
@AkashR4J 5 жыл бұрын
Sir...from deep heart ...you really make me understand
@lucasjohn3014
@lucasjohn3014 4 жыл бұрын
wonderful explanation mathematically.
@vishalyadav067
@vishalyadav067 3 жыл бұрын
Love you so much sir , i see alote of KZfaq video about c++ * pattern but no one explain how this nested for loop work , but my doubt is clear after watching this video....👍👍👍👍🙏🙏🙏🙏❤️❤️❤️❤️one of the best teacher for c programming language in the world....
@ammulurani8285
@ammulurani8285 3 жыл бұрын
Finally got it..after so many trials...thanks
@m3dev
@m3dev 3 жыл бұрын
The best KZfaq channel i have seen ever, thanks buddy for the easy explanation.
@bharathkumars8535
@bharathkumars8535 4 жыл бұрын
Worthy Channel ! Truely amazing sir. Thanks a lot for your great efforts.
@rohitupasani3239
@rohitupasani3239 5 ай бұрын
I have been confused about this pattern logic for a month I wasn't able to understand it, you explained it in a very easy way thank you so much sir ❤️
@rohitkumarverma7258
@rohitkumarverma7258 Жыл бұрын
this is the best solution of the pyramid problem ,this is really helpul .thanks to the nesso academy for this .
@johnarnold8603
@johnarnold8603 5 жыл бұрын
In C, the comparison of part of the "for loop" is calculated every pass through the loop. So, the j
@aruhi8524
@aruhi8524 2 жыл бұрын
Thanks because of you I found my first programming language easy and it's my first vedio. Have wishful days.
@luthandoguleni8100
@luthandoguleni8100 4 жыл бұрын
neso iike your channel you are a good teacher
@sadakalo2818
@sadakalo2818 5 жыл бұрын
Yes ! This is Beautiful and you are the Master.
@Sinister_Rewind
@Sinister_Rewind 4 жыл бұрын
Wow sir that was awesome, ur explanation is lit !!! I never thought i will get this program in just some mins
@bjr816
@bjr816 4 жыл бұрын
I had to learn this in cpp and java and yet I had to come to CProgramming video to understand it lol. It all makes sense now.
@asifalam206
@asifalam206 4 жыл бұрын
Amazing one sir.... 💚 from 🇧🇩
@bscreationvlog300
@bscreationvlog300 Жыл бұрын
It is the best channel for learning For dry run every program... thanks so much... Sir...
@mformust6502
@mformust6502 3 жыл бұрын
the best best best best best best top top top and the most wonderfull video to learn these structure.God bless you sir
@YuvarajK-ew3cm
@YuvarajK-ew3cm 2 ай бұрын
Thank you !! this helped me to clear the concept of coordination or placement well explained with boxes !!
@codeforces8729
@codeforces8729 2 жыл бұрын
Very very well explained I must say bt there should be a new line like below: For(i=1;i
@vikaspanchal6628
@vikaspanchal6628 2 жыл бұрын
Thanks, looking for this only
@TeluguGamersClub
@TeluguGamersClub 4 жыл бұрын
Thanq Neso academy you made this one very easy to understand
@surajdhulannavar3696
@surajdhulannavar3696 5 жыл бұрын
without using if loop we use for loop as for(j=1;j
@PrashantPatil.
@PrashantPatil. 4 жыл бұрын
you really great teacher 👍👍👍👍
@cryscoxx
@cryscoxx Жыл бұрын
your tutorials are the best. i find myself understand the concept fully from your videos. if there were any other creators appear when i search for something, i'll always put you first, for real! thank you sir 💖
@muhammadfachri3884
@muhammadfachri3884 4 жыл бұрын
Clearly explained, good job for making this video, it helps a lot. I hope your channel get a lot of subcribers
@renugadevi611
@renugadevi611 5 жыл бұрын
Wonderfull explanation 👌👌👌👌👌👌👏👏👏👏
@peymant2341
@peymant2341 2 жыл бұрын
I was all good until 07:56 . how does writing n-2-1 is going to ACTUALLY relate it to the second column? How does C figures out we are using Matrix? { int i, j; for(i=1;i
@Abhishek-yf7wi
@Abhishek-yf7wi 2 жыл бұрын
int main() { int a,b=1; printf("Enter the Pyramid size "); scanf("%d",&a); for(;a>0;a--) { for(int j=a;j>1;j--) printf(" "); for(int i=1;i
@Abhishek-yf7wi
@Abhishek-yf7wi 2 жыл бұрын
and if you change b+=1; a different pattern will be printed. so you have solution for two different problems.
@ScifiTunnel
@ScifiTunnel 5 жыл бұрын
n-2+1 but super simple superb ❤️❤️❤️ 🇮🇳
@yashwanthreddy1378
@yashwanthreddy1378 6 жыл бұрын
Sir please do complete the whole syllabus. I watch ads as a token of appreciation. Great channel
@rayanqeadan9219
@rayanqeadan9219 3 жыл бұрын
thank u very much i really appreciate it 👌👌
@computertreasure8856
@computertreasure8856 3 жыл бұрын
Your channel is best ....👌👌 You are providing complete and clear concept of programming...I am very lucky that I got your channel.... thank you so much sir 🙏🙏 for this content.😊😊
@amrsaad9772
@amrsaad9772 4 жыл бұрын
Actually this is amazing video.. You made it very easy to understand with your representation
@equianodevonte2301
@equianodevonte2301 4 жыл бұрын
There's a formula for the number of spaces printed on each row prior to the selected character (totalRows - rowNum). It's fewer lines of code or a simpler implementation.
@avigarg7859
@avigarg7859 3 жыл бұрын
sir why at 8:31 you are considering n-1 as(n-2)-1? wouldn't it form n-3 as a result
@tomidebbie2078
@tomidebbie2078 Жыл бұрын
You’re one of the greatest people in the world
@highwaysouth9015
@highwaysouth9015 Жыл бұрын
Thanks 🙏
@dem0aikido
@dem0aikido Жыл бұрын
Very good explanations. All your videos is a small treasure. Thank you
@nandinishende750
@nandinishende750 Жыл бұрын
Your explanation is fabulous..... Thank you so much from Bottom of my heart 💓
@shreyneol1269
@shreyneol1269 2 жыл бұрын
sir in vs code, the nested for loop produces different result, it simply prints all the stars in one row. if we wont break the line after the completion of inside for loop, it will simply print on the same line. for( int i=1; i
@kesanakurthirajesh143
@kesanakurthirajesh143 Жыл бұрын
nice explanation sir .Thank you..
@akkapakapujitha9482
@akkapakapujitha9482 4 жыл бұрын
wow very great explanation sir thank you sooo much for your clear explanation .The best lecture of pyramids of c ever.
@pramodkumarsahu7092
@pramodkumarsahu7092 2 жыл бұрын
I have watched so many related videos. This is the best!. Thanks a lot for this
@roshinisrini227
@roshinisrini227 2 жыл бұрын
fall in love with your way of explaining...... just awesome
@vanigudipati5826
@vanigudipati5826 5 жыл бұрын
Seriously just loved d video and the way u are saying bro......i had seen many videos to understand this, but I came to understand only by seeing this video😍
@saiganapriya3024
@saiganapriya3024 4 жыл бұрын
Exactly!! ❤
@ammulurani8285
@ammulurani8285 3 жыл бұрын
Yess....really..
@yadav211
@yadav211 4 жыл бұрын
Literally man u r an op dude... I don't even need any screenshot ... U r fire dude 🔥 🔥 🔥
@cocolasticot9027
@cocolasticot9027 Жыл бұрын
As an alternative you can write your if statement for the blanks : (with the for loops initialised to 0) if (i + j < n - 1 || j - i > n - 1) { printf(" "); } else { printf("*"); }
@ececse
@ececse Жыл бұрын
thankyou sir
@nazmapervin7198
@nazmapervin7198 4 жыл бұрын
This is one of the most helpful videos!!Keep it up!!
@rightwinger2709
@rightwinger2709 4 жыл бұрын
Extraordinary 👍🏻👍🏻👍🏻
@manhtranthien612
@manhtranthien612 Жыл бұрын
thanks a lots for your lession, it's really hopefull for me to practice c++ thanks a lots
@dgovardhan3430
@dgovardhan3430 3 жыл бұрын
Sir so good explanation thank u for explaining with logic❤️.
@hanadotexe
@hanadotexe 4 жыл бұрын
brilliant!!! thank you!!!
@nabeelmhd669
@nabeelmhd669 3 жыл бұрын
this is the best trick....thankyou for making the job simple !!
@prototype18
@prototype18 3 жыл бұрын
I completely understood what you said Sir ,,But failed to perform the same afterwards by myself,, How can I develop the Logic and not just memorize the Code.? :'(
@elianapathan2034
@elianapathan2034 3 жыл бұрын
Same situation is here 😓😓
@fitwithprathamYT
@fitwithprathamYT 3 жыл бұрын
first try to generate logic on paper on pseudo code then do program don't directly jump to r8 the code
@fitwithprathamYT
@fitwithprathamYT 3 жыл бұрын
#include int main() { int i,n,j,p,q; printf("no de be"); scanf("%d",&n); p=n; q=n; for(i=0;i
@brodieboy255
@brodieboy255 5 жыл бұрын
Pretty good explanation, but you can do the whole thing with only one loop #include #include int main(void) { int n; printf("How many rows you want fam? "); scanf("%d", &n); int j = 2*n-1; char row[j]; memset(row, ' ', j); for(int i=0; i
@ronniesenpai4839
@ronniesenpai4839 6 ай бұрын
Very well explained! 👏🏻
@vikramsingh-xz8uk
@vikramsingh-xz8uk 5 жыл бұрын
Excellent bro nice video ....you rocks bro...u got the swag...
@manoharsagunthalla9215
@manoharsagunthalla9215 2 жыл бұрын
Thank you very much sir! No one , so far explain the mathematical theory ( calculus) behind it, explain behind forming pyramids.
@alstutorial5075
@alstutorial5075 3 жыл бұрын
bro you are literally intelligent you just explain so clearly from other youtuber for that you got subscribed as a reward(0v0)smile
@Ravikumar-gj6qw
@Ravikumar-gj6qw 4 жыл бұрын
Great explanation bro
@aniketsingh1667
@aniketsingh1667 4 жыл бұрын
Very well explained buddy 👌 that was really helpful
@vikassaini1935
@vikassaini1935 3 жыл бұрын
You are best in the business
@ankammaraochintala2509
@ankammaraochintala2509 3 жыл бұрын
Super explanation thank sir
@kalgikansara7369
@kalgikansara7369 4 жыл бұрын
Simple explanation 👍
@anandrp8456
@anandrp8456 2 жыл бұрын
Thank you. understand the idea.
@lasttimeifappedwas3851
@lasttimeifappedwas3851 4 жыл бұрын
Main tutorial starts from 5:06
@piyushraval1509
@piyushraval1509 4 жыл бұрын
Thanx sir
@sakshisrivastava7033
@sakshisrivastava7033 3 жыл бұрын
I'm in love with dry run now... And u made this happen sir
@yogeshs4397
@yogeshs4397 4 жыл бұрын
Amazing teaching.... I understood everything
Special Programs in C − Check If The Number Is Palindrome Number
8:14
How to solve any Star Pattern Program
18:47
Simply Coding
Рет қаралды 1,1 МЛН
Or is Harriet Quinn good? #cosplay#joker #Harriet Quinn
00:20
佐助与鸣人
Рет қаралды 20 МЛН
❌Разве такое возможно? #story
01:00
Кэри Найс
Рет қаралды 4,1 МЛН
10 Math Concepts for Programmers
9:32
Fireship
Рет қаралды 1,8 МЛН
Call By Value & Call By Reference in C
8:34
Neso Academy
Рет қаралды 1,3 МЛН
C Program For Diamond Pattern With Star | Number | Alphabets
15:28
ECIT Engineering
Рет қаралды 38 М.
patterns in C - Tips and Tricks
1:18:42
CSE GURUS
Рет қаралды 810 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 644 М.
Solve any Star Pattern program in Python
18:44
Simply Coding
Рет қаралды 930 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
Or is Harriet Quinn good? #cosplay#joker #Harriet Quinn
00:20
佐助与鸣人
Рет қаралды 20 МЛН