急求,C语言大神指教求导,在线等!
发布网友
发布时间:2023-07-26 23:43
我来回答
共1个回答
热心网友
时间:2024-12-04 22:09
void GetSum(int a[], int n, int *three, int *five)
{
int i;
*three = *five = 0;
for(i = 0; i < n; ++i)
{
if(a[i]%3 == 0)
*three += a[i];
if(a[i]%5 == 0)
*five += a[i];
}
}
void TurnString(char *str)
{
char *p, *q, tmp;
p = q = str;
while(*q++ != '\0')
;
q -= 2;
while(p < q)
{
tmp = *p;
*p = *q;
*q = tmp;
p++;
q--;
}
}
追问不好意思本人小白,能否完整写出
谢谢