Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 i need help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
fire581




PostPosted: Tue Nov 29, 2005 4:11 pm   Post subject: i need help

i need help with turing...im clueless

problem:

create a program that will ask the user for an interger between 1 and 50.the program should output all the prime factors of that integer
Sponsor
Sponsor
Sponsor
sponsor
Albrecd




PostPosted: Tue Nov 29, 2005 4:16 pm   Post subject: (No subject)

Asok said:
Quote:
the compsci.ca staff would like to inform you that any thread with the topic title is general such as "I need help" "help me please" "Help fast ASAP" will be deleted and you will not recieve help
person




PostPosted: Tue Nov 29, 2005 4:20 pm   Post subject: (No subject)

ask us a question and we'll help, ask us to do ur hwk, and u'll ge flamed[/quote]
fire581




PostPosted: Tue Nov 29, 2005 4:26 pm   Post subject: (No subject)

k fine....i can do some of the program, its just i have no idea how to make the make the program find the prime factors. all i know is that it uses 'div' and/or 'mod'......i think
fire581




PostPosted: Tue Nov 29, 2005 4:39 pm   Post subject: (No subject)

ummm is anyone gonna hepl me.....if no say so, so i dont wait in front of my comp like an idiot while i could be doing something much more productive
Tony




PostPosted: Tue Nov 29, 2005 4:44 pm   Post subject: (No subject)

such as learning how to program perhaps?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Albrecd




PostPosted: Tue Nov 29, 2005 4:46 pm   Post subject: (No subject)

You should probably do something more productive. We will try to help, but it will probably take longer for us to answer than you want to wait... This is a Forum, not a chat room.
fire581




PostPosted: Tue Nov 29, 2005 4:49 pm   Post subject: (No subject)

u didnt answer my question, and im only in grd.7 and turing is new to me and i made a big mistake, taking advanced course....but probably a bigger mistake was asking you lot
Sponsor
Sponsor
Sponsor
sponsor
fire581




PostPosted: Tue Nov 29, 2005 4:50 pm   Post subject: (No subject)

btw that last post was meant to go to the moderator person, not the person who actually offered help
Tony




PostPosted: Tue Nov 29, 2005 4:53 pm   Post subject: (No subject)

primes?
factors?

it's all there Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Albrecd




PostPosted: Tue Nov 29, 2005 4:56 pm   Post subject: (No subject)

You should post at least a start to your program so that we can help you with it. Otherwise, we're doing it for you. If you can't even start, you should talk to your teacher, they can help you learn. (It's kinda why they exist)
fire581




PostPosted: Tue Nov 29, 2005 5:54 pm   Post subject: (No subject)

i didnt realise u said that until a short while ago(i was doing something productive)
yea will this is what i got....the very advanced ppl who read this are gonna hav a good laugh, and something funny to tell their equally advanced frends....

%A program that asks for a number and outputs its prime facotrs.

%Variable Declarations
var newint:int
var factors:int

%Input
put"Input a number between 1 and 50. "..
get newint

%Processing/Output
factors:=newint mod 2
if factors = 0
then put 2

factors:=newint mod 3
elsif factors=0
then put 3

factors:=newint mod 5
elsif factors=0
then put 5

factors:=newint mod 7
elsif factors=0
then put 7

factors:=newint mod 11
elsif factors=0
then put 11

factors:=newint mod 13
elsif factors=0
then put 13

factors:=newint mod 17
elsif factors=0
then put 17

factors:=newint mod 19
elsif factors=0
then put 19

factors:=newint mod 23
elsif factors=0
then put 23

end if

it obviously doesnt work, and i need to be enlightened
MysticVegeta




PostPosted: Tue Nov 29, 2005 6:46 pm   Post subject: (No subject)

Isnt there a post that I posted with Prime factors using recursion... Zylum had the right solution, use the search button Smile
Tony




PostPosted: Wed Nov 30, 2005 10:05 am   Post subject: (No subject)

fire581 - start by going through Turing Walkthrough.. you need to learn the basics before diving into algorythms

MysticVegeta - keep recursion away from fire581 Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
ZeroPaladn




PostPosted: Wed Nov 30, 2005 10:18 am   Post subject: (No subject)

fire581 wrote:
u didnt answer my question, and im only in grd.7 and turing is new to me and i made a big mistake, taking advanced course....but probably a bigger mistake was asking you lot



fire581 wrote:
btw that last post was meant to go to the moderator person, not the person who actually offered help


not the best thing to say when your asking for help, hmm? Naughty
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 15 Posts ]
Jump to:   


Style:  
Search: