求元素在数组中位置

2025-06-27 00:43:07
推荐回答(3个)
回答1:

for(int i =0; i{
if(a[i] == temp) //temp为要查找 的元素
return i; //i为该元素在数组中的位置
}
请采纳答案,支持我一下。

回答2:

假如矩阵式m*n。 i = 66. j = 65时。 在B中的位置为(66-1)*m+65.

回答3:

195,这个是三对角矩阵吧