fork download
  1. #!/usr/bin/perl
  2. print("The Perl5 Add/Multiply Program.\n");
  3. $a = 50;
  4. $b = 50;
  5. $c = ($a + $ b);
  6. print("A ". $a." B " . $b . " C ".$c."\n");
  7. $d = 50;
  8. $e = 50;
  9. $f = ($d * $e);
  10. print("D ".$d." E ".$e." F ".$f."\n");
Success #stdin #stdout 0s 5284KB
stdin
1
2
10
42
11
stdout
The Perl5 Add/Multiply Program.
A 50 B 50 C 100
D 50 E 50 F 2500