Results 1 to 2 of 2

Thread: how can i do this (nested loopsss...............................)

  1. #1
    Join Date
    Jun 2015
    Posts
    1
    Platforms
    Windows Android

    Default how can i do this (nested loopsss...............................)

    //THIS IS MY CODE FOR THAT PLS HELP







    Qt Code:
    1. #include <iostream>
    2. using namespace std;
    3. int main()
    4. {
    5. int i,j,k;
    6. for(i=1;i<2;++i)
    7. {
    8. for(k=1;k<5;k++)
    9. cout<<" ";
    10. for(j=1;j<9;j++)
    11. cout<<"*";
    12. cout<<endl;
    13. }
    14. for(i=1;i<=7;++i)
    15. {
    16. for(k=1;k<12;++k)
    17. cout<<" ";
    18. for(j=1;j<=1;++j)
    19. cout<<"*";
    20. cout<<endl;
    21. }
    22. for(i=1;i<=4;++i){
    23.  
    24. for(k=1;k<5;++k)
    25. cout<<" ";
    26. if((i==1||i==4))
    27. {
    28. for(j=1;j<8;++j)
    29. cout<<"*";
    30. }
    31.  
    32. else{ cout<<"*";
    33. }
    34. cout<<endl;
    35. }
    36.  
    37. cout<<endl;
    38.  
    39.  
    40.  
    41.  
    42. return 0;
    43. }
    To copy to clipboard, switch view to plain text mode 
    Untitled.jpg
    Last edited by anda_skoa; 13th June 2015 at 09:33. Reason: missing [code] tags

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: how can i do this (nested loopsss...............................)

    Please repost your code with the [code][/code] tags with proper indentation. You might also want to state what you're trying to achieve and where you are having a problem.

Similar Threads

  1. Nested Repeaters QML Qt
    By TheIndependentAquarius in forum Qt Quick
    Replies: 2
    Last Post: 1st March 2014, 15:03
  2. c++ nested class
    By sonulohani in forum General Programming
    Replies: 1
    Last Post: 25th June 2012, 07:48
  3. Nested Layout
    By starcontrol in forum Qt Programming
    Replies: 2
    Last Post: 9th April 2008, 12:47
  4. nested tables
    By Jeroen van der Waal in forum Qt Programming
    Replies: 1
    Last Post: 6th June 2007, 17:12
  5. Nested Plugins
    By Luis Rodriguez in forum Qt Programming
    Replies: 1
    Last Post: 10th March 2006, 22:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.