Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. new stars

new stars

Scheduled Pinned Locked Moved C / C++ / MFC
12 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yaaqub
    wrote on last edited by
    #1

    * *** ****** ******** ************ ************* a new stars :I want to solve this triangle...... John,K -- modified at 1:05 Tuesday 7th March, 2006

    G A T 3 Replies Last reply
    0
    • Y yaaqub

      * *** ****** ******** ************ ************* a new stars :I want to solve this triangle...... John,K -- modified at 1:05 Tuesday 7th March, 2006

      G Offline
      G Offline
      Gavin Taylor
      wrote on last edited by
      #2

      WTF? :confused: Gavin Taylor w: http://www.gavspace.com

      1 Reply Last reply
      0
      • Y yaaqub

        * *** ****** ******** ************ ************* a new stars :I want to solve this triangle...... John,K -- modified at 1:05 Tuesday 7th March, 2006

        A Offline
        A Offline
        Abebe
        wrote on last edited by
        #3

        This is the coolest post i've read in the Visual C++ forum for quite some time. Er zit een korstje op mijn aars.

        T 1 Reply Last reply
        0
        • A Abebe

          This is the coolest post i've read in the Visual C++ forum for quite some time. Er zit een korstje op mijn aars.

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          Abebe wrote:

          This is the coolest post i've read in the Visual C++ forum for quite some time.

          oh, you've been away for a while, haven't you ?! :rolleyes:

          A 1 Reply Last reply
          0
          • Y yaaqub

            * *** ****** ******** ************ ************* a new stars :I want to solve this triangle...... John,K -- modified at 1:05 Tuesday 7th March, 2006

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            i have a solution for you :

            printf("*\n**\n***\n****\n*****\n******\n");

            :laugh:

            B 1 Reply Last reply
            0
            • T toxcct

              Abebe wrote:

              This is the coolest post i've read in the Visual C++ forum for quite some time.

              oh, you've been away for a while, haven't you ?! :rolleyes:

              A Offline
              A Offline
              Abebe
              wrote on last edited by
              #6

              Well...i don't post that much, but i just HAD to reply to this one ;) Er zit een korstje op mijn aars.

              1 Reply Last reply
              0
              • T toxcct

                i have a solution for you :

                printf("*\n**\n***\n****\n*****\n******\n");

                :laugh:

                B Offline
                B Offline
                BadKarma
                wrote on last edited by
                #7

                surely one can do better

                for(int iStars = 2, iCount = 1; iStars < 256; iStars++)
                  if(!(iStars & (iStars - 1)))
                  {for(int iDraw = 0; iDraw < iCount; iDraw++) std::cout << "*"; std::cout << std::endl; iCount++;}
                

                codito ergo sum

                T 1 Reply Last reply
                0
                • B BadKarma

                  surely one can do better

                  for(int iStars = 2, iCount = 1; iStars < 256; iStars++)
                    if(!(iStars & (iStars - 1)))
                    {for(int iDraw = 0; iDraw < iCount; iDraw++) std::cout << "*"; std::cout << std::endl; iCount++;}
                  

                  codito ergo sum

                  T Offline
                  T Offline
                  toxcct
                  wrote on last edited by
                  #8

                  damn, that was ironic !! i never intended to give that lazy boy a that easy solution...

                  B 1 Reply Last reply
                  0
                  • T toxcct

                    damn, that was ironic !! i never intended to give that lazy boy a that easy solution...

                    B Offline
                    B Offline
                    BadKarma
                    wrote on last edited by
                    #9

                    :(( I tought that min was ironic to, just wanted to add up to the confusion :(( codito ergo sum

                    T 1 Reply Last reply
                    0
                    • B BadKarma

                      :(( I tought that min was ironic to, just wanted to add up to the confusion :(( codito ergo sum

                      T Offline
                      T Offline
                      toxcct
                      wrote on last edited by
                      #10

                      erf, sorry, did not understood it that way... you should have have much more lines... line a 100 hundred lines function ;)

                      B 1 Reply Last reply
                      0
                      • T toxcct

                        erf, sorry, did not understood it that way... you should have have much more lines... line a 100 hundred lines function ;)

                        B Offline
                        B Offline
                        BadKarma
                        wrote on last edited by
                        #11

                        will do next time,:) but its not as easy as it seems to write blubbery correct working code.:-D But I do believe that when he uses that code in the assignment It will surely be noted by the teacher.:laugh: codito ergo sum

                        T 1 Reply Last reply
                        0
                        • B BadKarma

                          will do next time,:) but its not as easy as it seems to write blubbery correct working code.:-D But I do believe that when he uses that code in the assignment It will surely be noted by the teacher.:laugh: codito ergo sum

                          T Offline
                          T Offline
                          toxcct
                          wrote on last edited by
                          #12

                          '5' for the rest... :cool::rose:

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups