C Practical and Assignment Programs-Pattern Printing 9

  Рет қаралды 311,268

We The Computer Guys

We The Computer Guys

Күн бұрын

Пікірлер: 142
@ZaiiZ3ro
@ZaiiZ3ro 6 жыл бұрын
dude you're a life saver !!!
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@wethecomputerguys9903
@wethecomputerguys9903 10 жыл бұрын
@V Lak Here is the link to the diamond pattern. wethecomputerguys.com/2014/09/08/pattern-printing-28/
@SmartProgramming
@SmartProgramming 6 жыл бұрын
awesome work sir, keep going, best wishes for future 👍👍
@nikhilgoyal8340
@nikhilgoyal8340 9 жыл бұрын
Here for printing spaces in the second case we can use the same for loop as used above that is ::: for(colSpace = totalRows-row ; colSpace >=1 ; colSpace--) In the second for loop since we have started counting rows from 4 the same logic for printing spaces will work.
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@SaumyaSharma007
@SaumyaSharma007 5 жыл бұрын
Thanks man 👍 for the concept....
@arilee5450
@arilee5450 10 жыл бұрын
Thank you so much for your detailed explanation. it was extremly helpful!
@ItTimetotravel
@ItTimetotravel 4 жыл бұрын
kzbin.info/www/bejne/moisloemh5eBrdU for reverse pattern for beginner
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@DannyKnot
@DannyKnot 9 жыл бұрын
What if instead of using white spaces I wanted to use "+" ?
@deepaagrawal8653
@deepaagrawal8653 10 жыл бұрын
thanks for making me to take intrest in learning in pattern only becoz of ur awesome video
@deepaksuri8423
@deepaksuri8423 7 жыл бұрын
I looking for help with the pattern of : Seven lines of output as follows: The first consists of 3 spaces followed by a star. The second line consists of 2 spaces followed by a 3 stars. The third consists of one space followed by 5 stars, and the fourth consists just of 7 stars. The fifth line is identical to third, th sixth to the second and the seventh to the first.
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@abhitasan
@abhitasan 9 жыл бұрын
Can you provide me a code whose pattern resembles to a diamond and in between that i have to write AMU ,means in the middle line ..
@serajhassan545
@serajhassan545 7 жыл бұрын
can u write code only using 3 loops that will print at a time instead of writing two times for each parts because its not look good.
@cafafans
@cafafans 5 жыл бұрын
I saw so many comments complaining; I decided to help you guys; for anyone that care, here is a link to my Github Repo. You can download all source codes. If you have any question; feel free to ask. github.com/ElectronicMoney/PatternPrinterCProgramming
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@justarandompersonontheinte9818
@justarandompersonontheinte9818 4 жыл бұрын
Does this code uses recursion?
@MS-rl7rh
@MS-rl7rh 3 жыл бұрын
Thank you sir, it's very helpful
@bipros7
@bipros7 9 жыл бұрын
Sir,after coding the above statements when i run this program,stars of upper half of the triangle from row 1 to row 5....but the lower half of the triangle is not executed...I'm using turbo C++ compiler fr windows7...why is this happening?
@vijayKumar-pf8ol
@vijayKumar-pf8ol 8 жыл бұрын
beta ye work ni kregaa
@Kris-ui1wv
@Kris-ui1wv 6 жыл бұрын
#include int main() { int n, m, k, i= 1; printf("Vendosni numrat e rreshtave ");//n-nr rreshtash scanf("%d", &n); i = n - 1;//i hapesira for (k = 1; k
@vignesh8507
@vignesh8507 5 жыл бұрын
@@Kris-ui1wv appreciate you
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@esomcmuffin8989
@esomcmuffin8989 10 жыл бұрын
Would you be able to write this code, except take in user input for the middle row and have a minimum of 2 stars in each row? Im having a lot of trouble in doing so. Thanks
@wethecomputerguys9903
@wethecomputerguys9903 10 жыл бұрын
Eso McMuffin I dint get your doubt. can u send me a sample input / output for your question?
@esomcmuffin8989
@esomcmuffin8989 10 жыл бұрын
So I would like the program to accept user input for the middle row and how many rows on top and below the middle as well. so if user enter 6 for middle row and 4 on top: ** **** ****** **** ** also, there cannot be less than 2 asterisks per row
@muhammadsheharyar4105
@muhammadsheharyar4105 7 жыл бұрын
you are awsome bro ......realy a helpfull video for my assgnment..keep it up
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@sunilsharma9611
@sunilsharma9611 9 жыл бұрын
Very very thanks for helping .
@muwangasulaiman9246
@muwangasulaiman9246 6 жыл бұрын
hey write for me a program which prints 6 stars in the first column,4 in the second,3 in the third,2 in the forth.remember there are 8 columns and 6 rows.but the forth row is printed throughout.am waiting thanks
@speakingwordsindia5631
@speakingwordsindia5631 8 жыл бұрын
not a correct code i think. The program is not running correctly plz help
@olsonjames2614
@olsonjames2614 4 жыл бұрын
how to get the out of 9 stars shape by using c++ program
@shristisinha7264
@shristisinha7264 5 жыл бұрын
how we will write the code for N pattern
@lakhdeepsingh5883
@lakhdeepsingh5883 7 жыл бұрын
sir pls tell, which platform you use to write codes, i use turbo c
@YashYadav-dd7is
@YashYadav-dd7is 7 жыл бұрын
Lakhdeep singh It is dev-c
@seeknithyashri6591
@seeknithyashri6591 7 жыл бұрын
sir why u r naming the lower half as 4 3 2 1...can we name it as 1 2 3 4....
@baljotsingh4013
@baljotsingh4013 4 жыл бұрын
Because the loop is working in reverse, so the rows will be 4 3 2 1, 1 2 3 4 is when you're iterating a normal loop
@skylar6268
@skylar6268 9 жыл бұрын
Sir , in the first nested loop to print * - last video u told the logic is.. for(colstar=1;colstar
@skylar6268
@skylar6268 9 жыл бұрын
i got it :P tq !
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@khanzadaasad4127
@khanzadaasad4127 9 жыл бұрын
how to make program for this output?? * * * * * * * * * * * *
@Junaidkhan-ti8qd
@Junaidkhan-ti8qd 9 жыл бұрын
+khanzada Asad hahahahahaha hpala e jora wa kana
@tryingtocorrect
@tryingtocorrect 8 жыл бұрын
+khanzada Asad This is just a quick one, surely can be done in a better way, but it works (size is the size of the figure): #include using namespace std; int main() { int size = 4; int halfHeight = 2 * size; for (int i = 0; i < halfHeight; ++i) { for (int j = 0; j < halfHeight - i; ++j) cout
@krishnadevanp3820
@krishnadevanp3820 6 жыл бұрын
Which compiler is this??...can you help.Me to install that on windows10
@satarabanolur9284
@satarabanolur9284 6 жыл бұрын
Krishnadevan P devC++ dude
@martialolipiano9803
@martialolipiano9803 4 жыл бұрын
please can you do it in Visual Logic?
@thespicyspicey
@thespicyspicey 4 жыл бұрын
Check out this video, you'll understand kzbin.info/www/bejne/lYmxhJpsdt9mgKc
@bonifacemusembi9459
@bonifacemusembi9459 9 жыл бұрын
how can i form this pattern * * * * * * * * * * * please help
@ThePheonix123
@ThePheonix123 8 жыл бұрын
The code source link is not working for me, can u pls post a working link?
@Ghandimw2
@Ghandimw2 8 жыл бұрын
+ThePheonix123 This is the same code but uses an input from the user in order to make the triangle. Use the online c++ compiler c++ shell and it'll run. #include using namespace std; int main() { int n; cout > n; for (int row=1; row=1; col--){ cout
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@zekosalemeh4135
@zekosalemeh4135 7 жыл бұрын
hey i saw all the video you install and i liked i want to know what to do if my dev c++ make cmd run then close without show me the solution
@ashishmane1343
@ashishmane1343 9 жыл бұрын
"9 7 C:\Users\Ashish\Desktop\porgrams\pattern print 2.cpp [Error] 'colstar' was not declared in this scope" what does that mean pleas tell me the solution on this error........
@wethecomputerguys9903
@wethecomputerguys9903 9 жыл бұрын
Ashish Mane Post your source code.
@ashishmane1343
@ashishmane1343 9 жыл бұрын
#include main(){ int totalrows=5; int row,colspace,rowstar; for(row=1;row=1;colspace--){ printf(" "); } for(colstar=1;colstar=1;row--){ for(colspace=1;colspace
@bipros7
@bipros7 9 жыл бұрын
Ashish Mane while declaring you mentioned rowstar instead of colstar,thatswhy this error is coming...
@Junaidkhan-ti8qd
@Junaidkhan-ti8qd 9 жыл бұрын
+Biprodip Sanyashi how this error can be removed plz tell me as they say "undefine colstar"in the upper written program
@skylar6268
@skylar6268 9 жыл бұрын
+Junaid khan error can be removed by changing the name of the variable rowstar into colstar (or) instead of colstar use rowstar itself !
@lynetsvotwa3704
@lynetsvotwa3704 9 жыл бұрын
please make the programs simple and i need a program to accept m*n matrix and generate a (m+1)(n+1)
@justinkujur4618
@justinkujur4618 4 жыл бұрын
How can i solve this program using a single loop
@yuvrajadkar
@yuvrajadkar 2 жыл бұрын
Shortest and Smart code for diamond pattern in just 2 FOR loops.. #include #include #include void main() { int n,row,col,flag=0; printf("Enter Number"); scanf("%d",&n); for(row=1; row>=1; row++) { for(col=1; col=row) printf("*"); else printf(" "); } printf(" "); if(row==n) flag=1; if(flag==1) row = row-2; } }
@Pachojuanck
@Pachojuanck 6 жыл бұрын
Ojala hubiera gente que explicara como tu, pero en español :/
@malkeetsingh8849
@malkeetsingh8849 9 жыл бұрын
Marvellous guys.
@shitizgupta3557
@shitizgupta3557 9 жыл бұрын
can you plz tell me how to print this &&&&&&& &&&&& &&& &
@Elporqué-m6w
@Elporqué-m6w 7 жыл бұрын
I need to make 64 combinations wiht + and - heelp me please in this
@IbnHussain12
@IbnHussain12 9 жыл бұрын
Great work ..
@dilhanidesilva548
@dilhanidesilva548 9 жыл бұрын
thank you sir
@aiazasheikh8224
@aiazasheikh8224 5 жыл бұрын
Kindly provide this using do while loop
@shaleen9434
@shaleen9434 7 жыл бұрын
sir please make a video on i in Ind Indi india
@SUNNYPATILkolhapurkar
@SUNNYPATILkolhapurkar 6 жыл бұрын
char word[ ]={'i','n','d','i','a'}; for(int i=0;i
@pratyushsrivastava4476
@pratyushsrivastava4476 6 жыл бұрын
Printf(" - %5.*",(arrayname), (width)) ; ... Look for it in you book
@zareensayed6922
@zareensayed6922 4 жыл бұрын
Thanks 😊
@profstat1970
@profstat1970 9 жыл бұрын
guys pls tell me how to find this output without using any spaces * ** * ** *
@tryingtocorrect
@tryingtocorrect 8 жыл бұрын
+Prof Stat hmm, how can that be done without spaces becouse it clearly ahs spaces..
@jasluvdeepsingh8491
@jasluvdeepsingh8491 8 жыл бұрын
The number of * printed is same as the row we are in. Row 1 has 1 * and 2 has 2 *. No need for spaces. Just write the loop for star with for(row=1; row
@zoufisha6376
@zoufisha6376 8 жыл бұрын
awesome and fully usefull
@benjidabull
@benjidabull 6 жыл бұрын
THANK YOU SO MUCH
@munazamalik7427
@munazamalik7427 6 жыл бұрын
Isi ko C++ me kese bnaty hn plz tell me 😑
@priyachaudhary1210
@priyachaudhary1210 6 жыл бұрын
If(j>=5-i&&j
@apsietese8718
@apsietese8718 3 жыл бұрын
Thank you
@suprajaprabakaran2159
@suprajaprabakaran2159 7 жыл бұрын
I need a mentor to write a c programming... I wanna know about the c programming from beginning... can u please guide me...can u give me ur email Id pls...
@shreyapaul358
@shreyapaul358 5 жыл бұрын
With my like u complete 1k like🙂
@nagapurisaivishal1667
@nagapurisaivishal1667 7 жыл бұрын
Please i need Code make video for below pattern 1 1 33 33 555555 33 33 1 1
@Abdu_401
@Abdu_401 6 жыл бұрын
Thanks
@mohammedk.k6472
@mohammedk.k6472 7 жыл бұрын
thanks Sir
@Usgshshs
@Usgshshs 9 жыл бұрын
kardeşim teşekkür ederim
@jhay-araguilar5462
@jhay-araguilar5462 10 жыл бұрын
if n = 4 4 3 2 1 3 2 1 2 1 1 Can you help me please?
@wethecomputerguys9903
@wethecomputerguys9903 10 жыл бұрын
Hope this would be helpful : wethecomputerguys.com/2014/08/23/pattern-printing-23/
@jhay-araguilar5462
@jhay-araguilar5462 10 жыл бұрын
//print spaces for(j=0;j0;j-) printf(“%d “,j); This part is incorrect and I try to rearrange this but it's still no good.
@wethecomputerguys9903
@wethecomputerguys9903 10 жыл бұрын
Jhay-ar Aguilar We are extremely sorry for our mistake ... Thanx for pointing it out.. I have updated the code .. Now it works fine..
@jhay-araguilar5462
@jhay-araguilar5462 10 жыл бұрын
We The Computer Guys It works. Thanks. :)
@andargachewmekonnen7164
@andargachewmekonnen7164 5 жыл бұрын
It is awesome
@diamondabbasi284
@diamondabbasi284 7 жыл бұрын
thank u sir
@aruna4760
@aruna4760 7 жыл бұрын
Sir please explain the below pattern 1 1 * 2 1 * 2 * 3 1 * 2 * 3 * 4 1 * 2 * 3 * 4 * 5
@arjaypaglinawan1996
@arjaypaglinawan1996 10 жыл бұрын
if n = 4 4 3 2 1 4 3 2 4 3 4 need help :(
@rithikroosen2416
@rithikroosen2416 5 жыл бұрын
If n=4 for(i=1;i=i;j--) { cout
@serdarkarakas996
@serdarkarakas996 8 жыл бұрын
lan bu ne biçim ingilizce 12 dakika 43 saniye boyunca işkence ettin be bilader. thanks for video, great india namaste
@sachinkumar5879
@sachinkumar5879 10 жыл бұрын
THANKSSSSSSSSSS SIRRRRRRRRRR
@vivekkumarsoni3860
@vivekkumarsoni3860 10 жыл бұрын
Nyc...
@vigneshseralathan9884
@vigneshseralathan9884 8 жыл бұрын
bro print this pattern. P M R A O R G O R R A P M Please help me out with this in C nd JAVA
@thespicyspicey
@thespicyspicey 4 жыл бұрын
Hello, it's been 4 years.. hope you had cleared this problem. If you still haven't, reply here, I'll send you the code and explain it to you.
@moixcodez1585
@moixcodez1585 6 жыл бұрын
omg your english ankcent.........
@xsquall19x
@xsquall19x 9 жыл бұрын
VASH HAMANYAK
@juanrodriguezluis4811
@juanrodriguezluis4811 5 жыл бұрын
good idea... sad that his accent is too strong... i can not understand, what he says.
@ashissahoo4158
@ashissahoo4158 9 жыл бұрын
how to draw pattern sssss s s s s s s sssss
@SUNNYPATILkolhapurkar
@SUNNYPATILkolhapurkar 6 жыл бұрын
for(int i=0;i
@DeepakYadav-gz9ei
@DeepakYadav-gz9ei 5 жыл бұрын
Quality bahoot kharab hai
@sawakokuronuma8689
@sawakokuronuma8689 6 жыл бұрын
bhai ya urdu ma ya hindi ma hi bol lety..
@TheZekf
@TheZekf 7 жыл бұрын
omg your accent dude :(
@atreyeesardar6100
@atreyeesardar6100 8 жыл бұрын
******* ***** *** * *** ***** *******
@dubbingertugalseries5155
@dubbingertugalseries5155 5 жыл бұрын
Q English ko chod rha hai.Hindi ma baat ker kuch samj v aa jaye..ya English seekh k bol.
@venkat2830
@venkat2830 9 жыл бұрын
c is difficult aaaaaaaaaaaaaa
@monukumar5618
@monukumar5618 5 жыл бұрын
Need to improve
@soustavnandy3043
@soustavnandy3043 3 жыл бұрын
Bad
@piyushsingh2719
@piyushsingh2719 4 жыл бұрын
thank you sir
@muhammadsheharyar4105
@muhammadsheharyar4105 7 жыл бұрын
* * * * * * * * * *******
C Practical and Assignment Programs-Pattern Printing 10
8:06
We The Computer Guys
Рет қаралды 100 М.
C Pattern Printing Programs | X Shape Explained
15:20
LearningLad
Рет қаралды 51 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
How to program pyramids using loops - 1
7:30
Artoves
Рет қаралды 128 М.
طريقة عامة لرسم جميع الاشكال ب(c++ ,vb)
21:35
منتظر القصير
Рет қаралды 215 М.
Let's make 16 games in C++: TETRIS
4:06
FamTrinli
Рет қаралды 3,9 МЛН
5-23 C++ Display Triangle Patterns With Nested Loops
7:21
Coding Homework
Рет қаралды 74 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 247 М.
Old Geometry Book from the 1960s
9:01
The Math Sorcerer
Рет қаралды 619
c programming video tutorial - diamond shape pattern printing
8:55
Special Programs in C − Pyramid of Stars
11:06
Neso Academy
Рет қаралды 899 М.
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН