Files
Borland-C/CPP/EJEMPLO1.CPP

31 lines
575 B
C++
Raw Permalink 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 1
//
// Programadores:
//
// Juan L¢pez Fern ndez
// Moiss Virumbrales Cuenca
// DAI 1§A
//
// Program ejemplo de tablas.
#include<stdio.h>
#include<conio.h>
int tabla[10];
int con;
void main() {
for (con=0;con<10;con++) {
clrscr();
gotoxy (20,12);
printf ("Introduce n£meros para llenar la tabla: ");
fflush (stdin);
scanf ("%5d",&tabla[con]);
}
clrscr();
for (con=0;con<10;con++)
printf ("\nEl valor introducido en la posici¢n %d es: %d",con+1,tabla[con]);
fflush(stdin);
getch();
}