Reply to Thread
Results 1 to 14 of 14
  1. #1
    pHi
    pHi is offline
    Honorary Member pHi's Avatar
    Join Date
    Jun 2006
    Location
    Gold Coast
    Age
    25
    Posts
    1,274

    GGLive
    Offline offline

    Rep Power
    7

    Im a VB noob. ne1 wanna make 20 bucks?

    ok heres the problem.
    This semester we're doin programming which i have absolutly no interest in. (i prefer the networking side of things) so intead of teaching myself how to use VB i figure ill pay some1 to do somethin that will prolly take them 30 mins. (I mean i'm not going to need to know this **** to do a cisco course...)

    neway heres the task

    Prime Factors. Using the following flow chart, first convert it into pseudocode then create a form that asks the user to supply an integer greater than 1 and then display all the prime numbers that multiply together to get the user’s number.

    and a flowchart


    and heres what i've done so far, im pretty sure its wrong though.

    start program
    dim interger n
    n > 1
    dim interger F
    F = 2
    If N > 1 Then
    f/d evenly Then
    Display F
    set N = F/N
    Else
    N + 1
    Else End
    End If
    If N < 1 Then
    F + 1 Then
    End if

    (as u can probably tell i've only been to 2 of these classes)

    if some1 wants to convert this into pseudocode and then write the code in VB in WORD. i'll transfer $20 bucks into their account. add me to msn or xfire first. DONT DO IT BEFORE SPEAKING TO ME AS I MAY HAVE ALREADY GOT IT AND YOU WOULD AHVE WASTED YOUR TIME!!! SO PLEASE CONTACT ME FIRST.

    MSN = contha@hotmail.com
    xfire = pHi12

    please keep the "dumbass" comments to a minimum. I know its very basic ****, i jsut cant stand it, i find it boring and its of no interest to me.

    thanx
    Last edited by pHi; 07-09-2007 at 01:54 PM.



  2. #2
    Monster Member FuRbY*'s Avatar
    Join Date
    Dec 2006
    Location
    the immunity syndicate
    Age
    33
    Posts
    3,327

    GGLive
    Offline offline

    Rep Power
    12
    pseudocode -> intricate names and you dont "dim" things. and the program starts with BEGIN programname and END programname

    instead of display its PRINT

    its hard to understand because the integers mean nothing as just letters.

    edit: woops, didnt look at the diagram.

    my attempt. i dont know how to do that loop

    Code:
    BEGIN PrimeFactors
    
    PRINT "Enter a number greater than 1"
    GET N
    F = 2
    IF N > 1 THEN
    	IF F divides N evenly THEN
    		PRINT F
    		N = N/F
    	ELSE 
    		F = F + 1
    	ENDIF
    ELSE
    	END
    ENDIF
    
    END PrimeFactors
    Last edited by FuRbY*; 07-09-2007 at 02:00 PM.
    #oprahsbookclub endorses the soldiers

  3. #3
    Senior Member RiFT[yc]'s Avatar
    Join Date
    Jul 2006
    Location
    Tweed
    Posts
    858

    GGLive
    Offline offline

    Rep Power
    6
    im dobbing on you. you are cheating. lolz on gg at skool shhhhh

  4. #4
    Godlike Member shotty tomato's Avatar
    Join Date
    Jun 2006
    Location
    2230
    Posts
    8,358

    GGLive
    Offline offline

    Rep Power
    15
    moved to the programming forums. GL with it - id try contacting chem, he knows his ****.

  5. #5
    Pro Member 1BAD33's Avatar
    Join Date
    Nov 2006
    Location
    Merrylands 2160
    Age
    24
    Posts
    7,020

    GGLive
    Offline offline

    Rep Power
    23
    il modify what furby got.

    Code:
    BEGIN PrimeFactors
    
    PRINT "Enter a number greater than 1"
    BOOLEAN numFound = false
    GET N
    F = 2
    
    DO
    IF N > 1 THEN
    	IF F divides N evenly THEN
    		PRINT F
    		N = N/F
    	ELSE 
    		F = F + 1
    	ENDIF
    ELSE
    	END
    ENDIF
    
    While numFound=false
    
    END PrimeFactors
    As you can see, i dont really understand what your trying to do. I added a boolean in a do while loop so the program will loop until the last condition is met(numFound=true). I dont know where numFound is to equal true or how this is meant to work, but all you gota do now is add a numFound=true where ever the program needs to end. For example:

    Code:
    BEGIN PrimeFactors
    
    ...
    
    
    
    IF N > 1 THEN
    	IF F divides N evenly THEN
    		PRINT F
    		N = N/F
                    numFound=true
    	ELSE 
    		F = F + 1
    	ENDIF
    ELSE
    	END
    ENDIF
    
    ...
    
    END PrimeFactors
    But like i said i dont completely understand whats ment to happen. From that flow chart example, its abit of a lol coz it looks as if the program is never going to end unless n !> 1

    Holden & Ford: Wasting fuel resource.

  6. #6
    Senior Member RiFT[yc]'s Avatar
    Join Date
    Jul 2006
    Location
    Tweed
    Posts
    858

    GGLive
    Offline offline

    Rep Power
    6
    if then rules, lol i do them woooo

  7. #7
    pHi
    pHi is offline
    Honorary Member pHi's Avatar
    Join Date
    Jun 2006
    Location
    Gold Coast
    Age
    25
    Posts
    1,274

    GGLive
    Offline offline

    Rep Power
    7
    yeh i dunno aye thats all we've got to go on.

    thanx for ur help anyway.

  8. #8
    Contributing Member Petro's Avatar
    Join Date
    Aug 2006
    Location
    Sydney
    Posts
    717

    GGLive
    Offline offline

    Rep Power
    0
    30 minutes? lol
    STEAM_0:1:113146

  9. #9
    Monster Member FuRbY*'s Avatar
    Join Date
    Dec 2006
    Location
    the immunity syndicate
    Age
    33
    Posts
    3,327

    GGLive
    Offline offline

    Rep Power
    12
    seeing as ive viewed this thread again, i was just looking over what sarge posted.

    since its a pre-test loop you actually use while/endwhile instead of repeat/until
    #oprahsbookclub endorses the soldiers

  10. #10
    Honorary Member
    Join Date
    Jul 2006
    Posts
    1,047

    GGLive
    Offline offline

    Rep Power
    7
    pretty sure he failed this assignment already since it was in september last year

  11. #11
    Pro Member CoFfeX's Avatar
    Join Date
    Jun 2006
    Age
    23
    Posts
    5,498

    GGLive
    Offline offline

    Rep Power
    35
    Function isNecro(thread)
    If thread.lastpost.date < this****ingyear Then isNecro = True
    isNecro = False
    End Function

    Dim freakout
    freakout = isNecro this****ingthread

    If freakout = True Then
    Call FREAKTHE****OUT
    Else
    Call Bemildlyamused
    End If
    Bork bork bork! - Swedish Chef on quantum entanglement.
    (>ಠ_ಠ)>-----~=D <(o.O<)

  12. #12
    Monster Member shirasE_'s Avatar
    Join Date
    Jan 2007
    Location
    Melbourne, Australia.
    Age
    21
    Posts
    3,518

    GGLive
    Offline offline

    Rep Power
    9
    Is this still up for 20 bucks? I can do it properly.
    AMD 5000+BE@3.21GHZ//2GB OCZREAPER//ATI HD3870@850/1301
    ANTEC 900//RAZER TARANTULA//TT TAI-CHI M2//SS 5HV2 XFI
    #GotGames #MelbCSS #s2.au #Reality.Gaming


  13. #13
    Pro Member 1BAD33's Avatar
    Join Date
    Nov 2006
    Location
    Merrylands 2160
    Age
    24
    Posts
    7,020

    GGLive
    Offline offline

    Rep Power
    23
    Quote Originally Posted by shirasE_ View Post
    Is this still up for 20 bucks? I can do it properly.
    Think you might have missed out son :/

    Holden & Ford: Wasting fuel resource.

  14. #14
    Pro Member chemicalNova's Avatar
    Join Date
    Jun 2006
    Posts
    6,256

    GGLive
    Offline offline

    Rep Power
    14
    Quote Originally Posted by FuRbY* View Post
    pseudocode -> intricate names and you dont "dim" things. and the program starts with BEGIN programname and END programname

    instead of display its PRINT
    You did not just attempt to standardize pseudocode did you?!?!?!?!

    chem
    There are no stupid questions... but there are alot of inquisitive idiots.
    -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Joseph
CEVO
Gametech
Activision
Activision
Blizzard
Gamestah