Ayuda me da error [Error] assignment of function 'float promedio(int*, int)'
Publicado por joel (4 intervenciones) el 08/03/2021 22:00:12
hola, necesito ayuda me ese error y no como cambiarlo, gracias de antemano
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
#include <stdio.h>
#include <stdlib.h>
float promedio(int valores[], int cantidad) {
int i;
float suma = 0.0;
for (i = 0; i < cantidad; ++i)
suma += valores[i];
return suma / (float) cantidad;
}
int main() {
float Contador=1;
float ContA=0;
float ContR=0;
int notas[10];
char nombre[20];
char opcion[3];
int n, i;
do {
printf("Ingrese nombre del alumno: ");
scanf("%s", nombre);
printf("Cuantas notas tiene %s? ", nombre);
scanf("%d", &n);
for (i = 0; i < n; ++i) {
printf(" Nota %d: ", i + 1);
scanf("%d", ¬as[i]);
}
printf("El promedio de %s es %.1f\n", nombre, promedio(notas, n));
printf("Desea calcular mas promedios (si/no)? ");
scanf("%s", opcion);
} while (opcion[0] == 's' || opcion[0] == 'S');
while(Contador=Contador+1)
{
if(promedio=3;)
ContA++;
if(promedio < 3);
ContR++;
}
return 0;
}
Valora esta pregunta


0