Question of the Week


1. What happens when you run the command below?

$ perl -e 'print int(2.4/0.2), "\n"'

2. What happens when you run the script below?

#! /usr/bin/perl

$USAGE="Usage: Q1.pl";

#

# Program Name: Q1

# Author: Robert Katz

# Date: Jan 10, 2000

# Purpose: Testing Floating Point Representation

$float = 2.4;

$div = 0.2;

print "$float\n";

print "$div\n";

print int($float/$div), "\n";

#END OF Q1