Computer Sciences Department logo

CS 368 (Summer 2009) — Day 2 Code Sample

Built during class.

#!/usr/bin/perl

use strict;
use warnings;

print "Enter temperature in Celsius: ";
chomp(my $celsius = <STDIN>);

my $fahrenheit = $celsius * (9/5) + 32;
print "= $fahrenheit degrees F\n";