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
Brazil

... make up the Brazilian population: the Portuguese, the original colonisers; Africans brought to Brazil as slaves; various other European, Middle Eastern, and Asian immigrant ...

 
 
 
This page was created in 28.1 ms