Special Programs in C − Pyramid of Stars
Вставка
- Опубліковано 4 сер 2018
- 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.org/donate
Memberships: bit.ly/2U7YSPI
Books: www.nesoacademy.org/recommende...
Website ► www.nesoacademy.org/
Forum ► forum.nesoacademy.org/
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#CProgrammingByNeso #CProgramming #PyramidCProgram #PatternProgram
This tutorial is by far the best on the internet in solving the pyramid problems, so beautifully expressed. Thank you Neso Academy! Brilliant job
Bhai kabhi fursat mile to Saurav sukhla sir Ka video dekhna
@@SurajKumar-jx4zw dekhkr idhr aaya hu bro
Yaha depth mei smjhaya gya
@@tamil8198 maybe because you dont put the new line character??
like that cause printf wont automaticly put the
character
@@SurajKumar-jx4zw rarattygg
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
You have literally nailed this concept in true mathematical style - kudos to you sir.
I am an Engineering Student and I found your way of teaching is best to understand all these concept. Excellent Sir !!
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. 🥰
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!
Hats off ! to your teaching style. Petition to bring your multiple copies into all the schools of India. 🙏
This is by far the BEST EXPLANATION of the pyramid nested loop that I have seen. Thank you SO MUCH, SIR!
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
Sir,your explanation is so good that even high school student can also understand. Thankyou sir.
Here we can write
If( j > (n-i) && j < (n+i) )
Instead of
If(j=n+(i-1))
This man can really teach. No tutorials on UA-cam beats this, Yes!, None!
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.....❣️❣️❣️🤪🤪
Yes, latest has not much to do with these basic courses.
I rarely comment on anything and this is by far one one the most well made tutorials I have ever watched!
Thank you for explaining with concept of matrix....clear view about the pyramid structure... thank you,
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 ! 🙌
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 ❤️❤️💯💯
Love you so much sir , i see alote of UA-cam 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....
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 💖
Wow sir that was awesome, ur explanation is lit !!! I never thought i will get this program in just some mins
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!
which one u likes plz put link here so we can also watch
u just did a racism 💀
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.
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("*");
}
The best UA-cam channel i have seen ever, thanks buddy for the easy explanation.
Clearly explained, good job for making this video, it helps a lot. I hope your channel get a lot of subcribers
Hats off to your explanation.
What a great lecture loved it.
Thanks a lot.
Worthy Channel ! Truely amazing sir. Thanks a lot for your great efforts.
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;
}
Can you explain step by step? thanks
Sir you are teaching very nicely.
Your teaching is outstanding and excellent.
Clearity of concept of how matrix is used in coding ..... It make quest. Bit easier .😎
Wowwww 😻😻😍 explained neatly nd clearly the concept !! 🖤😍💯😄
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 ❤️
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.😊😊
Sir...from deep heart ...you really make me understand
Easiest logic to solve patterns... Thanks to neso academy
Actually this is amazing video.. You made it very easy to understand with your representation
wow very great explanation sir thank you sooo much for your clear explanation .The best lecture of pyramids of c ever.
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.
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++)
Very good explanations. All your videos is a small treasure. Thank you
Thank you !! this helped me to clear the concept of coordination or placement well explained with boxes !!
Amazing teaching.... I understood everything
this is the best solution of the pyramid problem ,this is really helpul .thanks to the nesso academy for this .
Thanks because of you I found my first programming language easy and it's my first vedio. Have wishful days.
Excellent explanations ....
Best of the Best !!!!!
Very good explanation.. much easy to understand.. Thank u sir
really amazing finally i tried a another approach
I have watched so many related videos. This is the best!. Thanks a lot for this
Finally got it..after so many trials...thanks
Yes ! This is Beautiful and you are the Master.
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.
Amazing! The way you have simplified things is fantastic.
Hi
Bro, I wish I had this video 10 years ago when I took my first programming course.. very informative keep it up
Hey can you tell me how you build your own logic any tips please
It is the best channel for learning
For dry run every program... thanks so much...
Sir...
You are amazing sir ... I easly get this
Thank you so much.... 👌🏼
This is one of the most helpful videos!!Keep it up!!
Amazing one sir....
💚 from 🇧🇩
I'm in love with dry run now... And u made this happen sir
fall in love with your way of explaining...... just awesome
Thanq Neso academy you made this one very easy to understand
this is the best trick....thankyou for making the job simple !!
Thank you for clearing my doubt
A huge thank you to you, sir..this was the best explanation ever.✨
Lucid explanation of a tricky concept,thank u sir!!
Beautifully explained.
wonderful explanation mathematically.
the best best best best best best top top top and the most wonderfull video to learn these structure.God bless you sir
Can you please upload the data structure part of C in detail.
Will be very helpful
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.
Can u please clear one doubt, how do the random chosen integer i j can determine the place of * ? I mean i am just confused how does chosing variables determine the place
clearly explained! thanks!
Your explanation is fabulous..... Thank you so much from Bottom of my heart 💓
What a nice explanations about pattern! Awesome
a very good and important topic.what the coe will be for a diamond pattern?
Very well explained buddy 👌 that was really helpful
hello, what if i have E block and it 7 rows and 6 columns
Thank you very much sir! No one , so far explain the mathematical theory ( calculus) behind it, explain behind forming pyramids.
good explanation simple thank you wish i've found your channel before
Wonderfull explanation 👌👌👌👌👌👌👏👏👏👏
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
I can be only consider as rows ? Or can we consider it as columns?
Crystal clear, thanks Sir !
So well explained thank you for it!
Thank you. understand the idea.
without using if loop we use for loop as for(j=1;j
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.
exactly!
Yes, how to resolve this
@@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.
I was going to reply. But when I saw this comment in 3 yr old 💀. btw 10:18 here you can see
Excellent bro nice video ....you rocks bro...u got the swag...
Sir so good explanation thank u for explaining with logic❤️.
Most easily understandable lecture!❣
i did not understand y we use 2n-1 in the j col? can any1 explain plz
Finally I understood this!! Thanks a lot !!!!!!!!!!!!!!!!!!!!! :)
thanks a lots for your lession, it's really hopefull for me to practice c++ thanks a lots
oh, That amazing solution bro.
Mind blowing explanation
brilliant!!! thank you!!!
This is really superb ❤👏 I love it
Thankyou for such an easy explanation.
sir ,
there is a mistake in there .
we have to give another printf function for new line ,
printf("
");
then only print the stars as like 2*2 matrix...
i finally understood.. thank you so much!!
Very well explained! 👏🏻