代码搜索:PROGRAMS

找到约 10,000 项符合「PROGRAMS」的源代码

代码结果 10,000
www.eeworm.com/read/279234/10453720

pl fig06_14.pl

#!/usr/bin/perl # Fig 6.14: fig06_14.pl # Recursive fibonacci function. @sampleValues = (0, 1, 2, 3, 4, 5, 6, 10, 20, 30, 35); # Calculate and print the fibonacci value of all the above values
www.eeworm.com/read/279234/10453742

pl fig06_09.pl

#!usr/bin/perl # Fig. 6.9: fig06_09.pl # Demonstrating function rand. print "Random numbers produced by rand():\n"; for ( 1 .. 3 ) { print " ", rand(), "\n"; } print "\nRandom number
www.eeworm.com/read/279234/10453745

pl fig06_04.pl

#!/usr/bin/perl # Fig 6.4: fig06_04.pl # User-defined subroutines that take no arguments. subroutine1(); # call the subroutine with no arguments subroutine2(); # call the subroutine with no ar
www.eeworm.com/read/279234/10453749

pl fig06_13.pl

#!/usr/bin/perl # Fig 6.13: fig06_13.pl # Recursive factorial subroutine # call function factorial for each of the numbers from # 0 through 10 and display the results foreach ( 0 .. 10 ) {
www.eeworm.com/read/279234/10453753

pl fig06_03.pl

#!/usr/bin/perl # Fig. 6.3: fig06_03.pl # Demonstrating some math functions. $_ = -2; print "Absolute value of 5 is: ", abs( 5 ), "\n", "Absolute value of -5 is: ", abs( -5 ), "\n",
www.eeworm.com/read/279234/10453756

pl fig06_10.pl

#!/usr/bin/perl # Fig. 6.10: fig06_10.pl # Seeding the random number generator. # during each iteration, set seed to 1, # then produce three random integers for ( 1 .. 3 ) { print "\n\nSet
www.eeworm.com/read/279234/10453830

pl fig05_08.pl

#!/usr/bin/perl # Fig. 5.8: fig05_08.pl # Using the last statement in a foreach structure. foreach ( 1 .. 10 ) { if ( $_ == 5 ) { $number = $_; # store current value before loop end
www.eeworm.com/read/279234/10453846

pl fig05_17.pl

#!/usr/bin/perl # Fig. 5.17: fig05_17.pl # Using function 'die' to terminate a program. print "Please enter a numerator: "; chomp( $numerator = ); print "Please enter a denominator: "
www.eeworm.com/read/279234/10453854

pl fig05_09.pl

#!/usr/bin/perl # Fig. 5.9: fig05_09.pl # Using the redo statement in a while structure. $number = 1; while ( $number
www.eeworm.com/read/279234/10453858

pl fig05_16.pl

#!/usr/bin/perl # Fig. 5.16: fig05_16.pl # Using logical operators in flow control. print "Please enter a numerator: "; chomp( $numerator = ); # bare block; redo continues from beginn