Tema: contador
Ver Mensaje Individual
  #6 (permalink)  
Antiguo 15/07/2010, 14:25
Avatar de -rommel_
-rommel_
 
Fecha de Ingreso: junio-2008
Ubicación: Lima
Mensajes: 360
Antigüedad: 15 años, 10 meses
Puntos: 1
Respuesta: contador

si ya te entiendo...
declara estas variables
Código C++:
Ver original
  1. va_total = 27
  2.  va_inicio = 1
  3.  va_fin = 5
  4.  va_recorre = 1
  5.  va_direc = 1
  6.  
  7.  Para i = 1 hasta va_total
  8.     PRINT va_recorre
  9.     va_recorre = va_recorre + va_direc
  10.     Si va_recorre = va_inicio OR va_recorre = va_fin ENTONCES
  11.         va_direc = va_direc * -1
  12.     Fin Si
  13.  end Para

A ver si en algo te ayuda... Saludos...