29 lines
485 B
C
29 lines
485 B
C
|
#include <stdio.h>
|
||
|
|
||
|
typedef struct
|
||
|
{
|
||
|
float collect[10];
|
||
|
int position;
|
||
|
} tReal;
|
||
|
|
||
|
void minValores(tReal *tabla)
|
||
|
{
|
||
|
float min = tabla->collect[0];
|
||
|
for (int i = 1; i < tabla->position; i++)
|
||
|
{
|
||
|
if (tabla->collect[i] < min)
|
||
|
{
|
||
|
min = tabla->collect[i];
|
||
|
}
|
||
|
}
|
||
|
printf("%f", min);
|
||
|
}
|
||
|
|
||
|
int main(int argc, char **argv)
|
||
|
{
|
||
|
tReal tabla = {{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}, 10};
|
||
|
|
||
|
minValores(&tabla);
|
||
|
|
||
|
return 0;
|
||
|
}
|