Risk

Date: 198x
Type: Program
Platform(s): TS 2068

Calculates the percent chance in a single year that a body of water will overflow.

Appears on

One of a series of library tapes. Programs on these tapes were renamed to a number series. This tape contained programs 20001 to 20050. These tapes were compiled by Tony Willing.

Gallery

Risk

Source Code

   10 REM "Risk"
   20 PRINT "Variables:": PRINT 
   30 PRINT "T$-Name of Study-line 400"
   40 PRINT "C-Percent chance in a single year that event will be  exceeded-line 410"
   50 PRINT "N-time period(years etc) for desired risk computation-line 420"
   60 PAUSE 340: CLS 
  100 READ T$
  110 PRINT "C IS PERCENT CHANCE IN A SINGLE YEAR THAT DISCHARGE WILL BE     EXCEEDED"
  115 PRINT 
  120 READ C
  140 READ N
  150 LET LIKELIHOOD=(1-C/100)^N
  160 LET R=1-LIKELIHOOD
  175 LET R=INT (100*R+.5)
  180 PRINT TAB 10;T$: PRINT 
  190 PRINT 
  200 PRINT "THE RISK IS ";R;" PERCENT THAT THE   SPECIFIED ";C;" PERCENT FLOOD MAY BE EXCEEDED ONE OR MORE TIMES   IN A ";N;" YEAR PERIOD"
  400 DATA "WILLOW LAKE"
  410 DATA 1
  420 DATA 30
  430 STOP 

People

No people associated with this content.

Scroll to Top