0
I need add elements in 5*5 matrix such as index of the element are {(1,3),(2,2),(2,4),(3,1),(3,5),(4,2),(4,4),(5,3)} in c progra
I need solutions
5 Respuestas
+ 2
you want to add elements just with this indexes?
+ 2
for(int i=0;i<5;i++){
int t=i+1;
if(t==1 || t==5){
arr[i][3]=t;
}else if(t%2==0){
arr[i][2]=t;
arr[i][4]=t;
}else {
arr[i][1]=t;
}
}
i think is your answer
+ 2
your wellcome
+ 1
yes
0
thank you