Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - 已知一个整形数组[3,7,8,9,1,4,5],求该数组中所有值为偶数的元
已知一个整形数组[3,7,8,9,1,4,5],求该数组中所有值为偶数的元
#包含?& ltstdio.h & gt

int?main()

{

int?答[7]?=?{?3,7,8,9,1,4,5?};

int?我,s?=?;

对于(?我?=?;?我?& lt?7;?++i){

if(?甲[我]?%?2?==??)

s?+=?a[I];}

printf("%d\n ",s);

退货?;}