Archive

Archive for the ‘General Discussion’ Category

Win the next gen console

Tiger Woods PGA Tour 2013

March 26, 2012 Leave a comment

Tiger just won this past weekend at the arnold palmer event and his yearly game is coming out tonight at midnight. My GameStop is not having a midnight release for this so no tiger tonight, but I put in a few screens for you tiger fans.
This year kinect is a feature to tiger and from what I’ve played from the demo and at my local best buy, tiger is shaping up to become more of a realistic experience when compared to the real thing coming up short in some areas but almost up to par with the real thing.

20120326-214754.jpg

20120326-214806.jpg

20120326-214819.jpg

20120326-214829.jpg

COD Black Ops poster coming with a halo 4 clear sticker

March 26, 2012 Leave a comment

Coming soon I have to think of a good question to ask?

Categories: Freebies Tags: , ,

Xbox live 2 day free code

March 26, 2012 Leave a comment

Here it is sorry it’s late

20120326-144912.jpg

Categories: Freebies Tags: , ,

T Woods has the lead

March 24, 2012 Leave a comment

Tiger as of Saturday

20120324-195500.jpg

Xbox live

March 24, 2012 Leave a comment

Tonight free code nothing too special stay tooned

Categories: Freebies Tags: , ,

QBasic Tutorial 21-Preventing Duplicate Data In The Same Array

December 1, 2011 Leave a comment

QBasic Tutorial 21 – Preventing Duplicate Data In The Same Arrray

 

Make a program that will hold 4 First names within an array.

 

So first we declare FN which is First Names as a String:

DIM FN AS STRING

Declare an array called FNames, there will be four first names in this array. Created

as a string.

DIM FNames(4) AS STRING

We need a two counter-variables for a couple of FOR LOOP’s:

So we declare x as an integer as well as y:

DIM x AS INTEGER DIM y AS INTEGER

 

Then we declare Found as an Integer:

DIM Found AS INTEGER

Then clear the screen:

CLS

 

So here are declare statements:

DIM FN AS STRING DIM FNames(4) AS STRING DIM x AS INTEGER DIM y AS INTEGER DIM Found AS INTEGER

CLS

Start the FOR LOOP:

FOR x = 1 TO 4

Next start the DO LOOP:

FOR x = 1 TO 4  DO   INPUT “Enter Name: “, FN      —Placing the user input value within

FN.

Then set Found to equal 0 after the user input enter name:

INPUT “Enter Name: “, FN Found = 0

FOR x = 1 TO 4  DO   INPUT “Enter Name: “, FN   Found = 0     FOR y = 1 TO 4    IF UCASE$(FN) = UCASE$(FNames(y)) THEN

 

–This statement above means if the uppercase of FN is the same as the uppercase

conversion UCASE FNames y THEN we know that the name has been found.

So set Found to equal 1:

FOR y = 1 TO 4  IF UCASE$(FN) = UCASE$(FNames(y)) THEN   Found = 1  END IF NEXT y

IF Found = 1 THEN   PRINT “Duplicate Names Are Not Accepted”  END IF LOOP UNTIL Found = 0

FNames(x) = FN NEXT x

 

 

So here is what’s going to happen:

We start the FOR LOOP at FOR x = 1 TO 4. Then we start the DO LOOP until Found =

False or also 0.

We’ll get the user input and place it within FN, set Found to equal false or 0.

Within the second FOR LOOP we will check to see if the user input is the same as

what’s already in the array. If it is then Found becomes 1 or True.

Then we will go ahead and print duplicate names are not accepted loop back to prompt

the user to enter a name again.

If the name is not found the LOOP ends, then we’re alound to place our name within

our name array, then we go to our next x, and then repeating the process until our

loop ends.

The full code so far:

 

DIM FN AS STRING DIM FNames(4) AS STRING DIM x AS INTEGER DIM y AS INTEGER DIM Found AS INTEGER

CLS

FOR x = 1 TO 4  DO   INPUT “Enter Name: “, FN   Found = 0

FOR y = 1 TO 4    IF UCASE$(FN) = UCASE$(FNames(y)) THEN     Found = 1    END IF   NEXT y      IF Found = 1 THEN    PRINT “Duplicate Names Are Not Accepted”   END IF  LOOP UNTIL Found = 0    FNames(x) = FN NEXT x

 

Next we will print out the information: Printing out the entire array

PRINT PRINT PRINT “The Names In The Array: ”

FOR x = 1 TO 4  PRINT FNames(x) NEXT x

 

Ok so now we go ahead and run the code.

So this code is accepting 4 names for an array and will not accept duplicate names.

Final Code:

 

 

DIM FN AS STRING DIM FNames(4) AS STRING DIM x AS INTEGER DIM y AS INTEGER DIM Found AS INTEGER

CLS

FOR x = 1 TO 4  DO   INPUT “Enter Name: “, FN   Found = 0

FOR y = 1 TO 4    IF UCASE$(FN) = UCASE$(FNames(y)) THEN     Found = 1    END IF   NEXT y      IF Found = 1 THEN    PRINT “Duplicate Names Are Not Accepted”   END IF  LOOP UNTIL Found = 0    FNames(x) = FN NEXT x

PRINT PRINT PRINT “The Names In The Array: ”

FOR x = 1 TO 4  PRINT FNames(x) NEXT x

 

 

 

 

 

 

%d bloggers like this: