Old 07-09-2007   #1 (permalink)
pHi
Honorary Member
 
pHi's Avatar
 
Join Date: Jun 2006
Location: Gold Coast
Age: 22
Posts: 1,241
Rep Power: 4
Send a message via ICQ to pHi Send a message via MSN to pHi
Default 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
__________________
#OGN on Gamesurge

Last edited by pHi; 07-09-2007 at 01:54 PM..
pHi is offline   Reply With Quote
Old 07-09-2007   #2 (permalink)
Monster Member
 
FuRbY*'s Avatar
 
Join Date: Dec 2006
Location: the immunity syndicate
Age: 30
Posts: 2,998
Rep Power: 5
Default

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..
FuRbY* is offline   Reply With Quote
Old 07-09-2007   #3 (permalink)
Senior Member
 
RiFT[yc]'s Avatar
 
Join Date: Jul 2006
Location: Tweed
Posts: 832
Rep Power: 3
Default

im dobbing on you. you are cheating. lolz on gg at skool shhhhh
__________________
RiFT[yc] is offline   Reply With Quote
Old 07-09-2007   #4 (permalink)
GotGames Super Moderator
 
shotty tomato's Avatar
 
Join Date: Jun 2006
Location: 2230
Posts: 7,741
Rep Power: 10
Default

moved to the programming forums. GL with it - id try contacting chem, he knows his ****.
shotty tomato is offline   Reply With Quote
Old 07-09-2007   #5 (permalink)
Monster Member
 
SargeRX8's Avatar
 
Join Date: Nov 2006
Location: Merrylands 2160
Age: 21
Posts: 3,687
Rep Power: 6
Default

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
__________________

Click the sig to watch my Rambo Video

HuggyCHEA[2f][2sxc]: im a gentleman gee
HuggyCHEA[2f][2sxc]: but get me drunk broo, ill grab your tits
SargeRX8 is offline   Reply With Quote
Old 07-09-2007   #6 (permalink)
Senior Member
 
RiFT[yc]'s Avatar
 
Join Date: Jul 2006
Location: Tweed
Posts: 832
Rep Power: 3
Default

if then rules, lol i do them woooo
__________________
RiFT[yc] is offline   Reply With Quote
Old 07-09-2007   #7 (permalink)
pHi
Honorary Member
 
pHi's Avatar
 
Join Date: Jun 2006
Location: Gold Coast
Age: 22
Posts: 1,241
Rep Power: 4
Send a message via ICQ to pHi Send a message via MSN to pHi
Default

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

thanx for ur help anyway.
__________________
#OGN on Gamesurge
pHi is offline   Reply With Quote
Old 28-05-2008   #8 (permalink)
Contributing Member
 
Petro's Avatar
 
Join Date: Aug 2006
Location: Sydney
Posts: 718
Rep Power: 3
Default

30 minutes? lol
__________________
STEAM_0:1:113146


Petro's VAC Ban Detector: http://www.landypro.com/vac
Petro is offline   Reply With Quote
Old 28-05-2008   #9 (permalink)
Monster Member
 
FuRbY*'s Avatar
 
Join Date: Dec 2006
Location: the immunity syndicate
Age: 30
Posts: 2,998
Rep Power: 5
Default

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
FuRbY* is offline   Reply With Quote
Old 28-05-2008   #10 (permalink)
Honorary Member
 
Join Date: Jul 2006
Posts: 1,037
Rep Power: 4
Default

pretty sure he failed this assignment already since it was in september last year
CounterAct is offline   Reply With Quote
Old 29-05-2008   #11 (permalink)
Monster Member
 
CoFfeX's Avatar
 
Join Date: Jun 2006
Age: 20
Posts: 2,371
Rep Power: 5
Send a message via MSN to CoFfeX
Default

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!
CoFfeX is offline   Reply With Quote
Old 29-05-2008   #12 (permalink)
Monster Member
 
shirasE_'s Avatar
 
Join Date: Jan 2007
Location: Melbourne, Australia.
Age: 18
Posts: 3,555
Rep Power: 5
Send a message via ICQ to shirasE_ Send a message via AIM to shirasE_ Send a message via MSN to shirasE_ Send a message via Yahoo to shirasE_ Send a message via Skype™ to shirasE_
Default

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
#TRAiNWRECK melb.lan.net.invite - kto_-[1b]
shirasE_ is offline   Reply With Quote
Old 31-05-2008   #13 (permalink)
Monster Member
 
SargeRX8's Avatar
 
Join Date: Nov 2006
Location: Merrylands 2160
Age: 21
Posts: 3,687
Rep Power: 6
Default

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 :/
__________________

Click the sig to watch my Rambo Video

HuggyCHEA[2f][2sxc]: im a gentleman gee
HuggyCHEA[2f][2sxc]: but get me drunk broo, ill grab your tits
SargeRX8 is offline   Reply With Quote
Old 17-06-2008   #14 (permalink)
Pro Member
 
chemicalNova's Avatar
 
Join Date: Jun 2006
Age: 19
Posts: 5,593
Rep Power: 8
Default

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.
-
chemicalNova is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +10. The time now is 08:30 AM.


Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0