While Loop Problem

How do you download it localy? I'm desperatly looking for it
PLZ HELP

Get the link or start downloading it on international. Then switch to local and the download will continue.
 
deetlej1 I've seen you've had a couple of problems all around a common issue -> boolean logic.

This is the bread and butter of any programming, consider the following table (also known as a truth table:

A | B || A & B (and) | A | B (or) | A ^ B (xor)
----------------------------------------------------------
FALSE | FALSE || FALSE | FALSE | FALSE
FALSE | TRUE || FALSE | TRUE | TRUE
TRUE | FALSE || FALSE | TRUE | TRUE
TRUE | TRUE || TRUE | TRUE | FALSE

Then there are De Morgans laws, also very important
1.) !(A & B) <==> (!A | !B)
2.) !(A | B) <==> (!A & !B)

You need to know this stuff!
Check out these links:
http://en.wikipedia.org/wiki/Boolean_algebra_(logic)
http://en.wikipedia.org/wiki/De_Morgan's_laws

Knowing this should solve a lot of your problems...
 
Something else I just remembered, have you ever done this exercise? I'm sure 99% of the programmers here have and it's an invaluable thing to go through if you're a n00b.

You must generate each of the patters using a for, while & do while loop. That is you generate each one three times using a different looping structure each time. And you aren't allowed to mix and match e.g. nested for loop inside a while loop...

Code:
1.)
**********

2.)
**********
**********
**********
**********
**********
**********
**********
**********
**********
**********

3.)
*
**
***
****
*****
******
*******
********
*********
**********

4.)
         *
        **
       ***
      ****
     *****
    ******
   *******
  ********
 *********
**********

5.)

     *
    ***
   *****
  *******
 *********
***********


6.)
     *
    ***
   *****
  *******
 *********
***********
 *********
  *******
   *****
    ***
     *

7)
                 *
                ***
               *****
              *******
             *********
            ***********
             *********
              *******
               *****
                ***
                 *
      ***********************
     ************ ************
    ************   ************
   ************     ************
  ************       ************
 ************         ************
************           ************
 
Last edited:
Is this by any chance a unisa degree you doing, i remember doing something like that. would have to go through the study books again to refresh my mind

#1: Pretty simple, just have a for loop running for the duration of the amount of asterix's which would look something like: for (int x = 0, x <= 10, x++) and then just use the cout statement to input the characters.

#2: Same as number one but instead you use two for loops ( one to control the width and another to control the height:
eg: for ( int x = 0, x <= 10, x++ ) // Loop control for width
{
for ( int y = 0, y <= 10, y++ ) //loop control for height
{
cout << "*";
}
}


That's pretty much all i could come up with off the bat ( even then im not sure but looks right to me ), the rest would require me to actually code.
 
Last edited:
Is this by any chance a unisa degree you doing, i remember doing something like that. would have to go through the study books again to refresh my mind

Not me if that's who you referring to :D I was suggesting topics for deetlej1 to look at.

My last post was our first CSC101 tutorial :p But that was a while ago now :eek:
 
Not me if that's who you referring to :D I was suggesting topics for deetlej1 to look at.

My last post was our first CSC101 tutorial :p But that was a while ago now :eek:

Oh lol, shoulda kept track, now ive done work for nothing... oh well was nice reminiscing over the old days
 
Top
Sign up to the MyBroadband newsletter
X