C/Visual C - Integrar accion

 
Vista:
sin imagen de perfil

Integrar accion

Publicado por Wat (1 intervención) el 24/09/2021 01:02:11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include <stdio.h>
#include <stdlib.h>
//DEFINICION NODOS
 struct TElem; {
    TLluvia info;
    struct TElem *next;
};
//TLluvia registro
struct TLluvia{
    char localidad;
    float lluviaMinima;
    float lluviaMaxima;
    float lluviaAnual;
};
 
struct TElem *lista;
struct TElem *aux;
 
//INICIO
int main(){
 
 
    }
 
 
 
 
 
 
 
 
 
 
void mostrarLocalidades (struct TElem *lista){
    //LEXICO LOCAL
    int cant;
    float promedioAnual;
    struct TElem *aux;
    //INICIO
    aux = *lista;
    promedioAnual=0;
    cant=0;
 
    while (aux!=NULL){
        promedioAnual=promedioAnual + aux->info.lluviaAnual;
        cant++;
        aux = aux->next;
    } //FMientras
 
    if (cant=0){
        prinft ("Lista Vacia");
 
    }else{
        promedioAnual==promedioAnual/cant;
    }
     aux = lista->next;
 
    while(aux!=NULL){
 
    if(aux->info.lluviaMinima<promedioAnual){
        prinft("La localidad es:",aux->info.localidad);
    }
 
     aux = aux->next;
 
 
    } //FMientras
 
 
}//FAccion



Hola soy nuevo, no me sale crear una lista con los datos de ese registro, y utilizar la accion mostraLocalidades en la misma lista,alguien me podria mostrar como se hace porfa?, lo tengo que entregar hoy :c

Hi, I'm new, I can't create a list with the data from that record, and use the showLocalities action in the same list, could someone show me how to do it, please? I have to deliver it today: c
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder