Ver Mensaje Individual
  #6 (permalink)  
Antiguo 07/05/2014, 07:34
Avatar de vangodp
vangodp
 
Fecha de Ingreso: octubre-2013
Mensajes: 934
Antigüedad: 10 años, 7 meses
Puntos: 38
Respuesta: Dificultad con explicación de sentencia for

nada mejor que un source para reforzar lo que dice vosk XDD
Código C:
Ver original
  1. #include <stdio.h>
  2.  
  3. void A1(){
  4.     printf("A1 ");
  5. }
  6. void A2(){
  7.     printf("A2 ");
  8. }
  9. void A3(){
  10.     printf("A3 ");
  11. }
  12. void A4(){
  13.     printf(" A4 ");
  14. }
  15. void A5(){
  16.     printf("A5 ");
  17. }
  18. void A6(){
  19.     printf("A6 \n");
  20. }
  21.  
  22. int main (){
  23.     int i = 0;
  24.  
  25.     for ( i, A1(), A2(), A3(); i<20 ; i++,A4(), A5(), A6() ){
  26.         printf("%d",i);
  27.     }
  28.  
  29.     return 0;
  30. }
Idea de mi gran compañero amchacon XD

salida:
Código C:
Ver original
  1. A1 A2 A3 0 A4 A5 A6
  2. 1 A4 A5 A6
  3. 2 A4 A5 A6
  4. 3 A4 A5 A6
  5. 4 A4 A5 A6
  6. 5 A4 A5 A6
  7. 6 A4 A5 A6
  8. 7 A4 A5 A6
  9. 8 A4 A5 A6
  10. 9 A4 A5 A6
  11. 10 A4 A5 A6
  12. 11 A4 A5 A6
  13. 12 A4 A5 A6
  14. 13 A4 A5 A6
  15. 14 A4 A5 A6
  16. 15 A4 A5 A6
  17. 16 A4 A5 A6
  18. 17 A4 A5 A6
  19. 18 A4 A5 A6
  20. 19 A4 A5 A6
  21.  
  22. Process returned 0 (0x0)   execution time : 0.098 s
  23. Press any key to continue.