int f(int n){
int ans = 0;
for (int i=1;i<n;i++){
if (i<n/2){
ans - = i;
}
else{
ans += i;
}
}
return ans;
}
what does f(5) evaluate to?
hint- don't forget that dividing integer result in an integer ans
for example :9/4 =2
Answers
Answered by
3
Answer:
I don't get the question sorry about it
Answered by
9
Answer:8
Explanation:
Similar questions