c语言标编程序:输入n个整数,求其中的偶数平均值,并输出
c语言标编程序:输入n个整数,求其中的偶数平均值,并输出
日期:2017-10-01 18:36:28 人气:2
#include
#include
/* 从键盘中输入整数的个数,然后输入整数,求出其中偶数的个数,并求平均值 */
void main()
{
int n; //输入的整数个数
int i; //循环变量
int *p; //动态数组指针
int counter=0; //偶数整数计数器
int add=0; //累加器
float average=0;