{
  Verifica se uma sequencia de N valores digitados pelo usuario
  esta' em ordem estritamente crescente. 

  Interrompe a leitura dos valores caso verifique que a sequencia esta'
  em ordem estritamente crescente. 
}

program crescente;
var
   n, i, v1, v2	: integer;
   crescente	: boolean;
   
begin
   write('N: ');
   read(n);

   if n > 0 then
   begin
      crescente := true;  { Supoe que a sequencia esta' em ordem crescente.}
      
      write('v1: ');      { Le o primeiro elemento separadamente. }
      read (v1);
      
      i:=2;
      
      while (i <= n) and (crescente) do
      begin
	 write('v', i, ': ');  { Le um novo valor }
	 read(v2);
	 
	 if v2 <= v1 then       { Se o novo valor for menor ou igual ao anterior, }
	    crescente := false  { a sequencia nao esta' em ordem estritamente crescente. } 
	 else
	    v1 := v2; 
      end;
      
      if crescente then
	 writeln ('A sequencia esta em ordem estritamente crescente.')
      else
	 writeln ('A sequencia nao esta em ordem estritamente crescente.')
   end;
end.  
