#include <stdio.h>
int main()
{
	float x=1, a, b, c, d, e, f;

	printf("\nNumero de CDs:");
	scanf("%f", &a);
	
	f=a;
	for(x ; x <= f ; x++)
	{
	    printf("\nInforme Preco dos CDs em R$:");
	    scanf("%f",&b);
	    c+=b;		
        d=c/a;
        printf("\nA media dos precos foi:%f\n\n\n\n",d);
    }
} 

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: