Files
Borland-C/CPP/EJEMPLO2.CPP

32 lines
576 B
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Programa ejemplo 2
//
// Programadores:
//
// Juan L¢pez Fern ndez
// Moiss Virumbrales Cuenca
// DAI 1§A
//
// Program ejemplo de tablas.
#include<stdio.h>
#include<conio.h>
int tabla[100];
int con,num,conaux;
void main() {
for (con=0,num=10;con<100;con++,num=num+2)
tabla[con]=num;
clrscr();
for (con=99;con>=0;con--,conaux++) {
printf ("\nEl valor introducido en la posici¢n %d es: %d",con+1,tabla[con]);
if (conaux==24) {
fflush (stdin);
getch();
conaux=0;
}
}
fflush (stdin);
getch();
}