-1
我々は値がに何が起こっているかを確認することができますどのように...独立したシーケンスのn番目の要素を取得する方法は?
を私たちのシーケンスが
3、9、7、1であると仮定しましょう、その後、3、9、7、1、というように繰り返さ例えば605番目の要素である(その場合は3になる)
PS:「独立」とは、数式を見つけることができないということです。
ありがとうございます。P
無効なコードを追加して編集してください。
public static int determine_value_at_position_of_an_array(List<int> sequence, int power)
{
int counter = 1; /// This index is going to value of power.
int counter_2 = 0; /// This variable is responsible for jumping between [0..sequence.count-1]
int current_value = 0;
for (; counter<= power; counter++)
{
current_value = sequence[counter_2];
if (counter_2==sequence.Count-1) /// if we're at last element, then go to 1st
{
counter_2 = 0;
}
else
{
counter_2++;
}
}
return current_value;
}
を追加し、あなたがこれを達成しようとしたものを私たちに示してください。例えば、いくつかのコードは動作している必要はありません。質問の方法の詳細については、[ヘルプセンター](https://stackoverflow.com/help/how-to-ask) – Deathstorm
@Deathstormを参照してください。コードを追加しました。 – Xiaox