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
Bugatti

... in Mulhouse[?], close to the Bugatti factory. Between 1958 and 1975 (when their business failed) they secretly amassed a remarkable collection of the cars. Now known ...

 
 
 
This page was created in 43.9 ms