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
Autocracy

... - Wikipedia <<Up     Contents Autocracy Autocracy is a form of government which resides in the absolute power of a single individual. The term ...

 
 
 
This page was created in 26.9 ms