C
C#•7mo ago
Raevex

fusing 2 codes together

would be nice if someone could fuse them real quick 😄
10 Replies
Pobiega
Pobiega•7mo ago
We don't do things for you, we help you do it yourself.
Raevex
Raevex•7mo ago
then pls tell me how
Pobiega
Pobiega•7mo ago
well they are both fully written programs, albeit that second one has some structural problems... You'd have to decide on how you want the user to pick what piece of code to run then implement that
Raevex
Raevex•7mo ago
to the first one
Pobiega
Pobiega•7mo ago
note how your first program has something that looks like a menu going on it asks the user to say what method to run. you could turn the second program into a method and run it in the same way
Raevex
Raevex•7mo ago
i want that the user is just able to write numbers like in the second code but if i implement the code in there it doesnt work and i can write letters ;/
Pobiega
Pobiega•7mo ago
then go ahead and do that as you can see, it involves manually handling the input events
Raevex
Raevex•7mo ago
could you tell me were i put the second code into the first one
Pobiega
Pobiega•7mo ago
you cant just copypaste the entire thing you'd extract the parts of the second program you want into its own method, and call that method from the "menu" portion of the first programs Main
Raevex
Raevex•7mo ago
ok i will try it ty