Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Perl Programming/Exercise 8

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

PROGRAM FOR COUNTING THE NO: OF ENTRIES AND THE TOTAL #!/usr/bin/perl $total = 0; $count = 0; do { print ("Enter a number 0 to quit : "); $value = <>; chomp ($value); $total = $total + $value; if ($value != 0) {$count++;} } while ($value != 0); print ("\nNumber of entries : $count"); print ("\nTotal : $total\n");