Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  10
Language: C/C++
Code:
#include <stdio.h>
int main()
{
    int lista[100];
    int suma=0;c=0,i,n;
    float prom;
    system("cls");
    do{
        printf("cuantos elementos deseas ingresar :");
        scanf("%d",&lista[1];
    }
    for(i=0;i<n;i++)
    {
        if(lista [1]%2==0{
            suma =suma+lista[1];
            c=c+1;
            printf("%d",lista[1]);
        }
    }
    prom=suma/c;
    printf("son %d numeros positivos \n",c);
    system("pause");
    return 0;
}
Comments: