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.
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
im dobbing on you. you are cheating. lolz on gg at skool shhhhh
moved to the programming forums. GL with it - id try contacting chem, he knows his ****.
il modify what furby got.
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 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
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 !> 1Code: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
Holden & Ford: Wasting fuel resource.
if then rules, lol i do them woooo
yeh i dunno aye thats all we've got to go on.
thanx for ur help anyway.
30 minutes? lol
STEAM_0:1:113146
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
pretty sure he failed this assignment already since it was in september last year
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<)
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