0
The algorithm should read from 1000 to 15000 ( 1 thousand to 15 thousand) real numbers, sum all and carry out a average, I made several import processes, and final result export, but none copied.
#include <stdio.h>
int main(void)
{
int count,count_auxiliar;
float media;
float entrada[10];
/*
FAZER IMPORTACAO NESTE MOMENTO
*/
//para coontador de 0 ate nenhuma entrada, contador recebe +1
for(count=0; count!=EOF; count++)
{
// le entrada de arquivo
scanf("%f",&entrada[count]);
//contador auxiliar tem como funcao usar mesmo valor de contador mas sem alterar nada apenas para auxiliar no calculo da media
count_auxiliar=count;
// realiza media de arquivo de entrada
media=entrada[count]+media;
count_auxiliar--;
media=media / count_auxiliar;
}
/*
FAZER EXPORTACAO DE RESULTADO FINAL "MEDIA"
*/
return 0;
}
I will leave the code and comment where I need help, in case import a TXT file, with N values read all and calculate a media, and give end result in another TXT file.
In fact I do not know much programming, so what can help me I appreciate, if possible send your Whatsapp there that is easier! then I’ll explain everything in detail!
– AGenaro
@Agenaro: I don’t mind sending my Whatsapp, but the ideal was that we could resolve as many of your doubts here on website so that this can help others who later find this question and have the same doubts as you...
– Wtrmute