Rogue Nine Posted December 4, 2004 Share Posted December 4, 2004 See, that's predicated on the knowledge I actually know Java. Link to comment Share on other sites More sharing options...
swphreak Posted December 4, 2004 Share Posted December 4, 2004 I know basic Javascript, and HTML. I will be starting CS classes next semester... Link to comment Share on other sites More sharing options...
ET Warrior Posted December 4, 2004 Author Share Posted December 4, 2004 Originally posted by Rogue Nine See, that's predicated on the knowledge I actually know Java. Well.......yeah If you were working in C++ I would be a lot more help, as I've not learned Java yet Link to comment Share on other sites More sharing options...
Mex Posted December 4, 2004 Share Posted December 4, 2004 I don't know any languages. *Gets booed out* Link to comment Share on other sites More sharing options...
ET Warrior Posted December 4, 2004 Author Share Posted December 4, 2004 The real question here is, does my description of how to pull of the top three grossing films button sound reasonable and correct? Because I would assume after a semester of this course you would know enough Java to be able to handle three simple arrays in a loop Link to comment Share on other sites More sharing options...
tk102 Posted December 4, 2004 Share Posted December 4, 2004 Bah to Java. Perl solution: [spoiler][size=1]open $movie_database, "<", "movie.dat"; while (<$movie_database>) { next unless /\$(\d+)\s+\$(\d+)/; $this_gross=$1+$2; $this_movie=unpack('A*',substr($_,8,40)); if ($this_gross>$top3_gross) { if ($this_gross>$top2_gross) { if ($this_gross>$top1_gross) { $top3_movie=$top2_movie; $top3_gross=$top2_gross; $top2_movie=$top1_movie; $top2_gross=$top1_gross; $top1_movie=$this_movie; $top1_gross=$this_gross; } else { $top3_movie=$top2_movie; $top3_gross=$top2_gross; $top2_movie=$this_movie; $top2_gross=$this_gross; } } else { $top3_movie=$this_movie; $top3_gross=$this_gross; } } } close $movie_database; printf "Top 3 Movies:\n%s \$%d\n%s \$%d\n%s \$%d", $top1_movie, $top1_gross, $top2_movie, $top2_gross, $top3_movie, $top3_gross; [/size][/spoiler] Link to comment Share on other sites More sharing options...
TK-8252 Posted December 4, 2004 Share Posted December 4, 2004 There is a [ code ] tag, 102. cls if thread$ = "geeky" then print "This is the geekiest thread... EVAR." end if This is the geekiest thread... EVAR. Gimme a break, all I know is QBasic. Link to comment Share on other sites More sharing options...
tk102 Posted December 5, 2004 Share Posted December 5, 2004 the code tag doesn't work well with the spoiler tag. Test Oh.. this works... [spoiler]test[/spoiler] Fixed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.