



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Q1: Fuel Economy Script
Click Refresh (or Reload) to run this script again.
(33.3 marks)
for ( $counter = 0; $row = mysql_fetch_row( $result ); $counter++ ){ // build table print( "" );
foreach ( $row as $key => $value ) print( "$value" ); print( "" ); }
mysql_close( $database ); ?>
(33.3 marks)
(33.3 marks)
01 02 04 05 07 6 Errors Here 08 09
19 if ( number > largest ) then { 20 nextLargest = largest; 21 number = largest; 22 } 23 else if ( number > nextLargest ) 24 nextLargest = number; 25 26 counter++; 27 } 28 alert( "Two largest numbers: " + 29 largest + " and " + nextLargest ); 30 // --> 31 32 33 34 (12 marks)
(9.33 marks)
(12 marks)
01 #!C:\Perl\bin\perl 02 # authors.pl 03 # CGI program that generates a list of authors 04