Encyclopedia > Algol W

  Article Content

Algol W

BEGIN COMMENT SAMPLE PROBLEM; INTEGER N; REAL MAX, PRICE, SUM; N := 0; SUM := 0; MAX := 0; READ(PRICE); WHILE PRICE > 0 DO
      BEGIN 
      N := N + 1; 
      SUM := SUM + PRICE; 
      IF PRICE > MAX THEN 
          MAX := PRICE; READON(PRICE);
      END;
 WRITE(N,SUM,MAX) 
END.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Indian reservation

... Indian Reservation[?] Nez Perce Indian Reservation[?] Fort Hall Indian Reservation[?] Duck Valley Indian Reservation[?] Uintah and Ouray Indian Reservation[?] Goshute ...

 
 
 
This page was created in 42.9 ms