Update PR3

This commit is contained in:
2024-05-22 20:18:58 +02:00
parent fbaedb6630
commit 705eb312f4
7 changed files with 214 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,30 @@
#include <stdio.h>
typedef struct
{
float collect[10];
int position;
} tReal;
void maxValores(tReal *tabla)
{
float max = tabla->collect[0];
for (int i = 1; i < tabla->position; i++)
{
if (tabla->collect[i] > max)
{
max = tabla->collect[i];
}
}
printf("%f", max);
}
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};
maxValores(&tabla);
return 0;
}