for loop on different variables names

后端 未结 4 823
野趣味
野趣味 2021-01-27 12:09

I am programing for a while but for this i couldn\'t find an answer yet .

lets say i want to run on a loop when i change the names of the variables.

lets say i h

4条回答
  •  萌比男神i
    2021-01-27 12:38

    You can simple achieve this with defining an array as int ran[3] and then writing below code to get it:-

    ran[k % 3] = k;
    

提交回复
热议问题