C Practical and Assignment Programs-Printing Pascals Triangle
HTML-код
- Опубликовано: 16 сен 2024
- C Practical and Assignment Programs-Printing Pascals Triangle
It is the most common question asked in aptitude and interview.
In this video we are going to write a program to print a Pascal's Triangle. We are going to use nested for loops ie one loop inside another.The full description of question is provided below. Now this program is written in C programming language but will work in C++.Fell free to provide you suggestion.
Q. To print various patterns using loop constructs like:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
Source Code: wethecomputergu...
Facebook Page; / wethecomputerguys
Pattern Printing 6:
• C Practical and Assign...
Playlist: • C Practical and Assign...
Blog: wethecomputergu...
• C Practical and Assign...
We The Computer Guys
Shreyas Zagade
Aakash Thakur
Ananya Jain
very good logic. i was not at all understanding this before , but after watching the video it is quite clear. Thanks a lot
.One point-> in the last loop you told the "colchar" should start with 0,but i don't think so . We can start it from 1 as well . The changes required will be in the first loop "row" should start with 1and the condition over there would be "row
Thank you so much, brother, I was searching for this and I got it.
nice one sir, explanation is simply great 👍👍
thanks a lot man, other videos just show you how to do it but never really tell us why is that, in this video you just told us why and now I understand, thanks so much
I was searching for this THANK YOU!
Thank you!!!!!!
I was getting insane thinking how to do this for my homework
u have a nu suscriber :DD
A very good explanation of how to print pascal triangle without using factorial.
thank you sir .I can understand the logic clearly only from your video.
Well said sir....
I was looking for this, Thank you for the explanation!!
Respected Sir, the logic you used is nice, but for me I think I will define a function name Permutation and define there how a Permutation works and than I can use that function in the main loop as row no.C flag. flag goes from 0 to no.of charactera
Mauj kardi 😁
Thank you 👍
Feabules goood... its easy and .. its helpfull for me... thnx...
Nicely explained and very good logic. Thanks
nyc teaching i started thinking on my own bcz u
Nice sir...but i have a doubt in the following below step is.....
For(colspaces=no of rows-row;colspace>=1;colspace--);
You told like this sir....
But in this program we started row with 0,so we use
For(colspaces=no of rows-row-1;colspace>=1;colspace--);
I guess it is correct sir...so tell me the correct answer
best and easy explanation.......!!!
Well done 👏 ✔ 👍 👌 😀 🙌 👏 ✔
After the den++ in the next line within the loop itself printf(" ");
Hiiiii, I m Hardik,
I want to print a program like
if i print 122
output =121
prepelindrome number of the number which we have type....
like 145
output=141.....
i think u understand my question with the example perfectly.....
plzz give me answer as soon as possible.....
Thank you.
Thnkuuu Brooo....Help Me In SPA....Keep posting such VDO....
Very nice video
hi bro this video made my day
I really satisfied with it
please uplaod linked lists and pallindroem string and number
thank you :)
anushka chandel On the last line should there be 5 & instead of 6 &?
Can you please post one lecture for trapezoidal patter program in c?
really helpful....thanks...😃
Thankyou bhaiya..👍👍
graciaaaas!!
sir I am learning c for TCS once plz tel me how to prepare nd present nicely
amazing
Please explain the program in diamond comes in the middle portion of the rows
sir there is problem in this program for more then 5 rows because we ignored carry logic here which takes part after 5th row
sir I want c complete tutorial please. do it sir
nice information..
Can you please help with this program in C .?
Compute square root with time complexity o(log2n)
thank you sir
what is the ide you used for compiling the code
I’m new to programming but how would you do this for random letters on a keyboard . I want to make a simple triangle with 3 different letters or numbers . E.g = A,S,D
here we are adding 1 and 0 at the both ends and 0 next 1 in the middle
After 6 programs,,,guys to programmers✌✌
Shouldn’t the colspace definition be colspace= noofrows-rows-1
how the space between the numbers is coded,can anyone please explain
sorry bro,my suggestion was wrong.
What you had explained is right. it should start with 0 only not with 1.
got the logic.
anushka chandel Here is the link to the pattern wethecomputerguys.com/2014/09/18/pattern-printing-31/
please explain pascal's traingle once in an easy methode.
are you using a global variable?
will you plz do this program using 2d array
👍👍
which compiler is being used here?
Harman Kibue it's codeblocks
Devc++
sir, in 11 row for colspace the condition should be colspace > 1 not colsppace>=1
Hello sir, how to put inplace of 2 ,3,4 is 0 and 1 is as it is.
is there is any other essay way for programing pascal triangle because it is very difficult
sara srujan This is slightly easier ruclips.net/video/q9XRmwxVjTw/видео.html
how are the spaces occuring between the numbers even without giving a space after printchar declaration
Check Source Code wethecomputerguys.com/2014/03/31/c-practical-and-assignment-programs-printing-pascals-triangle/ line number 13 there is space
how to print sum of unique numbers in an array by using c programming language?
hi guys, wanted to ask one thing.
101001000...
how will we develop a pattern in which no. of zeros succeeding one is equal to no. of ones
e.g two zeros after second one and so on..
can you code it in V.B 6.0 too?
output is not like a triangle
how to add spaces between nos
just add a space after the %d. In the above video line no 19.
I can't understand c-programming how to understand it what the methods to learn it....!. how should I write a program easily
How could you do this using functions where one functions prints out the triangle, another one calculates the value of each number on any given line using ncr =n!/r!(n − r)!,
how to get prime factors of a number plz explain me
👏👌👌👌
Not loading your source code link to download
Ur blog is also not working
I am not able to understand the dry run of a program
how to print this pattern in c
why you have taken colchar as 0
it is showing segmentation fault (core damped)
Done dana done
Show the dry run bro
A
ABA
ABCBA
can u send me a link to this pattern
tejas patkar wethecomputerguys.com/2014/09/23/pattern-printing-33/ refer this link instead of 1 print A, 2 print B , etc
guys can you help me with this problem ?
Write a program to create a multiplication table for all combinations of two numbers from 1 to 8.(using nested while loop statement) notes diagonal part of the table must show the letters A-H not the product.
exact output :
1 2 3 4 5 6 7 8
1 A 2 3 4 5 6 7 8
2 2 B 6 8 10 12 14 16
3 3 6 C 12 15 18 21 24
4 4 8 12 D 20 24 28 32
5 5 10 15 20 E 30 35 40
6 6 12 18 24 30 F 42 48
7 7 14 21 28 35 42 G 56
8 8 16 24 32 40 48 56 H
arjay paglinawan Hope this would be helpful... wethecomputerguys.com/2014/08/15/pattern-printing-20/
thank you very much :)
hey can you please make a video for linklist program ........i m nt gettting problem to understding this progam
plz chage the language...display the programs in hindi ...n plz follow the step one by one that we shud understable..dis is kindly request to u..
Yes i m a good observer! 😂
If you are a good observer 🤣🤣🤣
why are using binomial when we can simply usse easier method....
i dint get the logic of writing the program
I am facing problem in 2nd row where 2/1*1/2 logic is in the program i know how these two come but i dnt get from which statement both of them get multiplied and we get result as 1 help me out from the problem thanks
Bandna Koushal The step on multiplication and division are separately done on 17th and 18th line of source code. Please refer this link for code wethecomputerguys.com/2014/03/31/c-practical-and-assignment-programs-printing-pascals-triangle/ .
We The Computer Guys thanks
Not got it
Can plz give me the code of this pattern
1
3 5
7 9 11
int k=1;
for(i=1;i
bad logic
Th way u speak..-repeating words again and again as if u yourself are confused .
This method seems so confusing + your voice = "???" ...
For me, this looks easy, but it really isnt
ye kya chuap h
.
You are talking too much
***** Here is the link: wethecomputerguys.com/2014/06/30/pattern-printing-13/
It explains the logic(look at the image) and the code.
poor teaching, you are confused sir.
do not teach like this
very bad representation
Not...in a proper way
Confuse kar diya bhaut chola pagal