Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- float FuncionMaximo(float b[]);
- int i,j;
- int main()
- {
- do{
- printf("cuanto datos ingresara ? \n");
- scanf("%i",&i);}
- while(i<=0);
- float array[i];
- for(j=0;j<i;j++){
- printf("ingrese valor %i",j);
- scanf("%f",&array[j]);
- }
- printf("%.2f", FuncionMaximo(array) );
- return 0;
- }
- float FuncionMaximo(float b[]){
- int j;
- float max = b[0];
- for(j=0;j<i;j++){
- if(max< b[j]){
- max = b[j];}
- }
- return max;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement