Files
basic-computer-games/78_Sine_Wave/perl/sinewave.pl
Chris Reuter d26dbf036a Removed spaces from top-level directory names.
Spaces tend to cause annoyances in a Unix-style shell environment.
This change fixes that.
2021-11-21 18:30:21 -05:00

18 lines
339 B
Perl
Executable File

#!/usr/bin/perl
use strict;
use warnings;
print ' ' x 30 ."SINE WAVE\n";
print ' ' x 15 ."CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n";
print "\n\n\n\n\n";
my $B=0;
for (my $T=0; $T<40; $T+=.25) {
my $A=int(26+25*sin($T));
print ' ' x $A;
if ($B==0) { print "CREATIVE\n"; }
if ($B==1) { print "COMPUTING\n"; }
$B= !$B; #Toggle
}