Off Topic > Off Topic

Programming Megathread

Pages: << < (113/241) > >>

McJobless:


--- Quote from: Ravencroft· on April 04, 2016, 06:32:32 PM ---this should be fun.... suggestions on how to approach?

--- End quote ---
This shouldn't be too hard :) If you haven't already, research "enums". I think you're already familiar with switches and if/else-if/else statements.

Take it one step at a time. Go through the problem and decide on what input you want from the user; my hint would be to find a way to avoid using strings and to make sure the user can only input correct values. Once you know how to handle input, then decide on the "skeleton" for all of those conditions; the result of one condition block will need to flow into the next, and so on until you get the final result.

When you're happy with the program flow, throw in the math, test, tweak, polish and submit. And always feel free to post code snippets if you're happy/unhappy with your work.



St. Francis Xavier:

Hello World in fortran 66, 77, 90, and 95

--- Code: ---        WRITE(4,10)
10     FORMAT(' HELLO WORLD!');
        END

--- End code ---


--- Code: ---     program hello_world
     implicit none
c
     character*32 text
c
     text = 'Hello World'
     write (*,*) text
c
     end

--- End code ---


--- Code: ---program hello_world
     print *, "Hello world!"
end program hello_world

--- End code ---


--- Code: ---write(*,*) 'Hello, world."
end

--- End code ---


Ravencroft·:


--- Quote from: McJobless on April 05, 2016, 06:30:25 AM ---This shouldn't be too hard :) If you haven't already, research "enums". I think you're already familiar with switches and if/else-if/else statements.

Take it one step at a time. Go through the problem and decide on what input you want from the user; my hint would be to find a way to avoid using strings and to make sure the user can only input correct values. Once you know how to handle input, then decide on the "skeleton" for all of those conditions; the result of one condition block will need to flow into the next, and so on until you get the final result.

When you're happy with the program flow, throw in the math, test, tweak, polish and submit. And always feel free to post code snippets if you're happy/unhappy with your work.



--- End quote ---
Thanks for the help man. I got it done in 6 hours last night and got an A on it. My previous biggest program was like 60 lines and this one was 440 lines. Crazy how complicated it gets for such a seemingly simple program.

Honno:

bump

y fractal:


Sierpinski triangle


McJobless:

That's some very cool stuff. Difficult to do?

I'm very hesitant to do any rendering-related programming. It seems like a very tough field to get into.

Right now I'm trying to find and consume as many C++ homework tasks/programming challenges as possible. I really want to get good at the logical side of things because I'd like to be working at a AAA studio at some point in the future. It's tough when your college doesn't offer that kind of support and there's no tutors for programming either.

Pages: << < (113/241) > >>

Go to full version