C Practical and Assignment Programs-Pattern Printing 8

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • C Practical and Assignment Programs-Pattern Printing 8
    In this video we are going to write a program to print a pattern in form of right angled triangle consisting of "*". 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:
    *
    ***
    *****
    *******
    **********
    Source Code: wethecomputergu...
    Facebook Page; / wethecomputerguys
    Pascals Triangle : • 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

Комментарии • 177

  • @dhruvpartha590
    @dhruvpartha590 9 лет назад +5

    excellent video.. was pondering over this for long.. helped me a lot.

  • @souvikpramanik5183
    @souvikpramanik5183 6 лет назад

    No suggestions from me.
    u r perfect sir....
    the size of the video is perfect..
    & the content is so simple to me now...
    Thanks a lot .....😊😊

  • @ataurrahaman6576
    @ataurrahaman6576 9 лет назад

    it is very very understanding for me,This is very very good method to make understand loop concept,thank you very much.

  • @danyalahmedkhan3359
    @danyalahmedkhan3359 9 лет назад +10

    i am a pakistani and i have to say this was a great tutorial and very nicely explained

    • @tarangranpara5913
      @tarangranpara5913 7 лет назад +2

      Danyal Ahmed Khan hello from India!

    • @bhend1
      @bhend1 7 лет назад +8

      Why do you even have to mention u r from pakistan....
      U dont have to be an indian to like this video.

    • @RevanthKausikan
      @RevanthKausikan 6 лет назад +1

      why do you have to say that you are from Pakistan?
      We all are brothers and sisters.
      :)

    • @sawakokuronuma8689
      @sawakokuronuma8689 6 лет назад

      m also a Pakistani

    • @inspectorvishakha2000
      @inspectorvishakha2000 5 лет назад +1

      @@RevanthKausikan right all brother and sister

  • @najmussaqib3754
    @najmussaqib3754 8 лет назад

    thanks alot realy very helpful for me. Easy to understand. GOD Bless You

  • @JD-oc3cd
    @JD-oc3cd 6 лет назад +1

    thanks so much.. tought m very nice way.

  • @shahonline5635
    @shahonline5635 8 лет назад +7

    Hello,I really liked this video but i request that please write this program in C++.

  • @yukii_kamishiro
    @yukii_kamishiro 6 лет назад

    nice video!
    very useful for the new programmer.
    thank from Cambodia.

  • @karthikk9938
    @karthikk9938 6 лет назад

    No doubts ur simply superb

  • @maestradebobobo767
    @maestradebobobo767 5 лет назад

    FINALLY!! Thanks bro, great video

  • @thevortex1881
    @thevortex1881 5 лет назад

    Thanks man ! Your video helped.

  • @RahulYadav-or9lb
    @RahulYadav-or9lb 5 лет назад

    sir thanks this is the very easy way

  • @Patr2ckT
    @Patr2ckT 9 лет назад +1

    Hey We The Computer Guys, what is the best way to learning Pattern Printing. As I go about following your steps, I try to conceptualize it in my mind but it seems hard to do so. To understand the concepts, should I keep practicing the code until I understand the concept or is it the other way around - getting the concepts first. Thanks for all the help

  • @mr.frenchii8973
    @mr.frenchii8973 9 лет назад

    thanks for this video, it very educational

  • @tapanjeetroy8266
    @tapanjeetroy8266 6 лет назад +1

    thanks a lot sir...

  • @oobb01
    @oobb01 10 лет назад +5

    How do you convert the line scanf("%d",&noOfRows) into java? if thats possible.

    • @wethecomputerguys9903
      @wethecomputerguys9903  10 лет назад

      Owen Chen You can do it in two ways one is using Scanner and other is using BufferedReader. But Scanner is easier one. 1)Declare Scanner ------> Scanner sc=new Scanner(System.in); 2)Take input ------> noOfRows=sc.nextInt(); 3)For using Scanner you need to import java.util.*

    • @ataurrahaman6576
      @ataurrahaman6576 9 лет назад

      By using the Scanner class or BufferedReader class you can scan.
      //after main method you have to write
      int n;
      BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
      System.out.println("How many Lines...");
      n=Integer.parseInt(br.readLine());

  • @KimAraLand
    @KimAraLand 6 лет назад

    It is more helpfull to me if you cosider "i"for rows and"j"for columns and write the program for pyramid programming

  • @ramonpaulocaumban39
    @ramonpaulocaumban39 2 года назад

    it really works!

  • @ahmedatifabrar7698
    @ahmedatifabrar7698 5 лет назад

    Great one!

  • @SmartProgramming
    @SmartProgramming 6 лет назад

    good logic sir, keep it up 👍👍
    but there one more method and simple logic for this, you can get it from my tutorial

  • @imyourmoon.5250
    @imyourmoon.5250 8 лет назад

    thanks you so much guy!

  • @AmitKumar-zx5ns
    @AmitKumar-zx5ns 8 лет назад +4

    it would be better if you explain simultaneously the concept for printing the column space and column stars ......thank you sir

    • @ghislainenelson2789
      @ghislainenelson2789 7 лет назад

      Corner to corner crochet pattern

    • @AnuvabAhmedApurno
      @AnuvabAhmedApurno 5 лет назад

      He made it complicated, think of the variables i,j,k...bla bla
      #include
      int main()
      {
      int i,j,n,k;
      printf("Enter the number of columns:
      ");
      scanf("%d", & n);
      for(i=1; i=1; k--)
      {
      printf(" ");
      }
      for(j=1; j

  • @viveknirmal4811
    @viveknirmal4811 10 лет назад

    THANK U VERY MUCH SIR...............

  • @alxprogrmz6093
    @alxprogrmz6093 7 лет назад

    We Teh Computer Guys -- i wrote a recursion one. Very easy Very easy................. noisruceR Recursion

  • @KUSHAGRASINGH28
    @KUSHAGRASINGH28 8 лет назад

    thanks for the help :)

  • @rockosawalkar5512
    @rockosawalkar5512 8 лет назад +1

    for the blank space loop. can we use this loop?
    for (i=1;i

  • @arunavasaha7051
    @arunavasaha7051 10 лет назад

    good coaching

  • @kaushikbodi1899
    @kaushikbodi1899 5 лет назад

    It surely was well explained and please explain the toughest patterns similarly

  • @fduusues
    @fduusues 4 года назад

    Can't I use horizontal and vertical tabs \v and \t to get gaps between '*' ?

  • @emdadulhaquechowdhury3622
    @emdadulhaquechowdhury3622 7 лет назад

    we need a tutorial on evaluating sine series upto a fixed term

    • @somnathghosh1211
      @somnathghosh1211 7 лет назад

      Emdadul Haque Chowdhury mail me..gsomnath69@gmail.com

  • @utkarshkumarsingh3309
    @utkarshkumarsingh3309 7 лет назад

    Sir, My compiler is Turbo c++ and this program is not working correctly in it. Can you please help, I have a practical exam day after tomorrow.

  • @abhayagarwal5097
    @abhayagarwal5097 5 лет назад

    Good one:-)

  • @nisa5947
    @nisa5947 5 лет назад

    hi need help from you guys, how to do that pattern printing using * without entering how many layer of * do you want to print or should I say without using scanf?

  • @apsietese8718
    @apsietese8718 3 года назад

    Mine is printing the half of a triangle which means right hand side is straight while left side descends from smaller to largest

  • @satyabratabiswas7772
    @satyabratabiswas7772 5 лет назад

    thank you

  • @ahmadraza-zq6iw
    @ahmadraza-zq6iw 6 лет назад

    please use variables easy to understand such as A B C D

  • @mosesflood3716
    @mosesflood3716 5 лет назад

    Where can we find the answer of the questions you gave in this video at the end?

  • @johnakoko616
    @johnakoko616 9 лет назад

    how can I print the same pattern making horizontal and vertical movement

  • @abysswatcher4907
    @abysswatcher4907 6 лет назад

    In Python:
    your_function = lambda n : print('
    '.join(' '*(n-1-i)+'*'*(1+2*i) for i in range(n)))

  • @TheSukhwinder11
    @TheSukhwinder11 6 лет назад

    Hi,
    can you please guide me on how this concept can work using while loop. How can we print triangle using while loop.?

  • @gokulkrishna1631
    @gokulkrishna1631 5 лет назад

    Which software is this in which you are programming ?

  • @waqashanjra7395
    @waqashanjra7395 8 лет назад

    A-o-A. Sir how we can print these: * * * *
    * * * * * *
    * * * * * * * * * * * *
    * * * * * *
    * * * *

  • @yusufaksoy3693
    @yusufaksoy3693 4 года назад

    thanks

  • @orbeypaltac4484
    @orbeypaltac4484 8 лет назад

    How can I write pyramid code with characters?procedure:void triangle ( int size,char fillCharacter)

  • @sujithasugumar543
    @sujithasugumar543 7 лет назад

    Sir I can't understand please explain me...how dat colspace loop will go to next row...bcoz row loop s the outer loop..bcoz of dat colspace loop I rejected in interview plz explain me sir..

  • @shreyapani3845
    @shreyapani3845 3 года назад

    Can you do pattern printing with numbers?

  • @chetanakushi9054
    @chetanakushi9054 7 лет назад +1

    circle pattern??
    plz!

  • @wethecomputerguys9903
    @wethecomputerguys9903  9 лет назад

    Anjani Chairunnisa For the first pattern refer this link it is quiet similar to this pattern wethecomputerguys.com/2014/09/04/pattern-printing-27/
    And for second pattern wethecomputerguys.com/2014/11/12/pattern-printing-38/

  • @cs15ankushkushwaha52
    @cs15ankushkushwaha52 6 лет назад

    You are using CMD for running program ....How.....???

  • @shiori43
    @shiori43 9 лет назад

    I'm really struggling trying to do a program that print:
    intput: 5
    x
    xxx
    xxxxx
    xxx
    x
    Could someone help me out? It confuses me.

    • @wethecomputerguys9903
      @wethecomputerguys9903  9 лет назад

      Shiori 日本 your required pattern is a combination of 2 patterns. Check this ruclips.net/video/q-D8BKfYKn4/видео.html and ruclips.net/video/wcdWk434LPE/видео.html .... You just need to print them 1 below the other,

  • @sasithrasockalingam3041
    @sasithrasockalingam3041 7 лет назад

    ***
    **
    *
    **
    ***
    can you help for this... when enter number of stars(Ex enter number 3) ... the output should be like this

  • @aartijarial748
    @aartijarial748 6 лет назад

    Hello I have also a question how we print 1 and 1 is disappear and the next one is appear, it means 1 ke bad 1 too aye but previous one disappear ho jaye in all screen I hope do you understand

  • @RCEmichaelreavey
    @RCEmichaelreavey 10 лет назад

    nice; how do you get the variable colStar to print for each line?
    printf("*, colStar")
    doesn't see colStar as a vaiable.
    Thank you

    • @mikasaackerman1863
      @mikasaackerman1863 Год назад

      what are you doing nowadays, hows your coding journey going on?

  • @tatafredrick4161
    @tatafredrick4161 8 лет назад

    how can i pattern on notepad using html ????? half triangle ??????

  • @harshilsiddhpura2729
    @harshilsiddhpura2729 6 лет назад

    Dude dnt speak English like someone forced you, be clear ,by the way you are doing a great job!

  • @waqashanjra7395
    @waqashanjra7395 8 лет назад

    using nested for loop (C++)

  • @melissamyphor3755
    @melissamyphor3755 4 года назад

    How to make pattern of alphabets

  • @sahithyakasiraju
    @sahithyakasiraju 9 лет назад

    Your explanation was very good sir. But when I try to execute the same code, I am able to get the required number of stars in each row but I could not get the perfect triangle shape.The spaces are uneven. I would be very much obliged if you can help me out.

    • @wethecomputerguys9903
      @wethecomputerguys9903  9 лет назад

      sahithya kasiraju check the source code : wethecomputerguys.com/2014/03/31/c-practical-and-assignment-programs-pattern-printing-8/ ..... If you still have any doubt do let us know..

    • @sahithyakasiraju
      @sahithyakasiraju 9 лет назад

      We The Computer Guys Thank you sir. I figured out what went wrong. A single spacing beside the star was missing in my code. I got the required output.

  • @yesserlabidi7831
    @yesserlabidi7831 4 года назад +3

    i'm so sad I didn't understand …

  • @bayroncastillo9409
    @bayroncastillo9409 6 лет назад

    better than collegue

  • @christylgalamiton1942
    @christylgalamiton1942 8 лет назад

    how to make a Shape Star pattern using (*) ? Most of the example here in youtube is pyramid and diamond!

  • @arpitkesarwani6123
    @arpitkesarwani6123 4 года назад

    Nice

  • @endosalim
    @endosalim 8 лет назад

    1-what about Aa Bb Cc ... Zz using for loop?2- 1 2 3 4 5 " I want it sooner if any one can!" 2 3 4 5 3 4 5 4 5 5

  • @retsedresakuragi5467
    @retsedresakuragi5467 9 лет назад

    ahm.... its like quite different from our programming... from turbo c++.. pls help to do the like that because it not the same format.
    like this
    #include
    #incclude
    void main()
    then blah blah...

  • @estayguillermo3526
    @estayguillermo3526 6 лет назад

    but I want the consecutive asterisks to be consecutive numbers

  • @sophiagalqania9901
    @sophiagalqania9901 5 лет назад

    can u explain a magic number logic ?

  • @suprajaprabakaran2159
    @suprajaprabakaran2159 7 лет назад

    sir...I need a mentor for writing a program....I wanna know about the beginning of c...can u please arrange me.....

  • @rajaahsan445
    @rajaahsan445 5 лет назад

    Can we print one then two then four

  • @terabhaiIGL
    @terabhaiIGL 8 лет назад

    which compiler you use

  • @junaidjaved5109
    @junaidjaved5109 5 лет назад

    Asslam o Alaikum, plz send the link of spacing formula videos in comment section

  • @teaavengers1250
    @teaavengers1250 5 лет назад

    I am trying in turbo c++ but net get answer

  • @schoolplay6573
    @schoolplay6573 9 лет назад

    thank

  • @udaymv63
    @udaymv63 6 лет назад

    How to print A in between *

  • @yuvarajyuvaraj5606
    @yuvarajyuvaraj5606 9 лет назад

    2012
    012
    12
    2
    please tell me the programm for this pattern

  • @janraleigh3030
    @janraleigh3030 9 лет назад

    can u make a letter V AND K pattern?

  • @a.tmusicproduction522
    @a.tmusicproduction522 5 лет назад

    thanks man it was very helpful bad accent though

  • @tanishqdiwan9628
    @tanishqdiwan9628 7 лет назад

    *
    *
    *
    *
    how this can be printed

  • @sujithasugumar543
    @sujithasugumar543 7 лет назад

    I wrote dis program in interview they rejected me...They told that first inner loop only execute first soo first col space loop will execute den col star loop will execute den only it will go to outer row loop ( that is for second row)

    • @somnathghosh1211
      @somnathghosh1211 7 лет назад

      sujitha sugumar yes...they were right...look where { is starting and where } is closing...You can mail me...gsomnath69@gmail.com

  • @shiprakumari9855
    @shiprakumari9855 4 года назад

    For short video of pattern printing ->
    ruclips.net/video/RTXLJvwoiWc/видео.html

  • @bipros7
    @bipros7 9 лет назад +3

    Sir,while coding the following printing pattern-
    * * * * * * * * *
    * * * * * * *
    * * * * *
    * * *
    *
    I'm not getting the concept regarding the condition of for loop of colStar...Pls explain this condition in brief...#We The Computer Guys

    • @amanrustagi1836
      @amanrustagi1836 8 лет назад

      +Biprodip Sanyashi This is called reverse pyramid pattern
      www.techcrashcourse.com/2016/01/print-reverse-pyramid-star-pattern-in-c.html

    • @meghanapriya3567
      @meghanapriya3567 7 лет назад

      diagonally also

    • @AnuvabAhmedApurno
      @AnuvabAhmedApurno 5 лет назад +1

      The code is
      #include
      int main()
      {
      int i,j,k,n;
      printf("Enter the number of columns:
      ");
      scanf("%d", & n);
      for(i=n; i>=1; i--)
      {
      for(k=1; k=1 ; j--)
      {
      printf("*");
      }
      printf("
      ");
      }
      return 0;
      }

  • @vickyjagtap7025
    @vickyjagtap7025 7 лет назад

    A
    ABA
    ABCBA
    ABCDCBA
    ABCDEDCBA
    How can draw this pattern

  • @shryoder
    @shryoder 5 лет назад +1

    *Is there a video on this, without Bobs and Vegana accent?*

  • @prasanakb2225
    @prasanakb2225 5 лет назад

    Pyramid varamaatudhu ore linaa naraya stars vante iruku

  • @amdadulhoquetohin7580
    @amdadulhoquetohin7580 10 лет назад

    hown to print
    *
    ***
    ****
    ******

    • @wethecomputerguys9903
      @wethecomputerguys9903  10 лет назад

      wethecomputerguys.com/2014/08/12/pattern-printing-19/
      Hope this would be helpful.....

  • @meghanapriya3567
    @meghanapriya3567 7 лет назад

    code for *****

  • @estayguillermo3526
    @estayguillermo3526 6 лет назад

    help me please

  • @sribhuvana3661
    @sribhuvana3661 8 лет назад

    Please explain the logic for following pattern
    1
    1 2 1
    1 2 3 2 1
    1 2 3 4 3 2 1

  • @MorganLee1997
    @MorganLee1997 7 лет назад

    Sounds like Rakesh in OwnagePrank

  • @y01cu_yt
    @y01cu_yt 3 года назад

    int bosluk,yildiz,sira,sira_sayisi; // bosluk:space , yildiz:star , sira:row , sira_sayisi:row number :))
    int bosluk,yildiz,sira,sira_sayisi;
    printf("Sira sayisini giriniz: ");
    scanf("%d",&sira_sayisi);
    for(sira=1;sira=1;bosluk--)
    {
    printf(" ");
    }
    for(yildiz=(sira_sayisi-sira)*2+1;yildiz>=1;yildiz--)
    {
    printf("*");
    }
    printf("
    ");

    }

  • @evanzelinejessy9946
    @evanzelinejessy9946 7 лет назад

    i want a c program to print
    1
    1 0
    1 0 1
    1 0 1 0
    1 0 1 0 1

    • @balajisr5617
      @balajisr5617 7 лет назад +1

      try this code.. :)
      void main()
      {
      int n;
      printf("enter n....");
      scanf("%d",&n);
      for(int i=1;i

  • @poornimapoornima3641
    @poornimapoornima3641 7 лет назад

    not at all clearance vedio

  • @rimpaghosh6809
    @rimpaghosh6809 7 лет назад

    wrong
    progrm

  • @nilayb7610
    @nilayb7610 6 лет назад

    Not so good

  • @sandeep6864
    @sandeep6864 10 лет назад +1

    u r making it very much complicated it is not helping out use less variable plz do so

  • @debubala4170
    @debubala4170 9 лет назад

    1
    2 1 2
    3 2 1 2 3

  • @nilayb7610
    @nilayb7610 6 лет назад

    Lol

  • @behnam2081
    @behnam2081 3 года назад

    I did not understand, bad english bro

  • @shubhamrajputppp
    @shubhamrajputppp 7 лет назад

    first make a flow in your tongue then do this type of stuff lol.

  • @angelichugs9001
    @angelichugs9001 6 лет назад

    hi i am looking this code in javascript Please

  • @estayguillermo3526
    @estayguillermo3526 6 лет назад

    but I want the consecutive asterisks to be consecutive numbers