📅  最后修改于: 2022-03-11 15:04:39.389000             🧑  作者: Mango
#include
void evenodd(int arr[])
{
int i, j, l;
printf("Odd\n");
for (i = 0; i < 7; i++)
{
if (arr[i] % 2)
{
printf("%d\n", arr[i]);
}
}
printf("Even\n");
for (i = 0; i < 7; i++)
{
if (arr[i] % 2 == 0)
{
printf("%d\n", arr[i]);
}
}
}
int main()
{
int freq[7] = {2, 5, 3, 1, 8, 4, 9}, i, j, l;
evenodd(freq);
return 0;
}