Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は配列を使用しています。配列から4つの要素を同時に呼び出したいので、それらを方程式で使用できます。誰もが方法を知っています。例 int a[10]={1,2,3,4,5,6,7,8};
1234+15 が欲しいのですがどうすればいいですか?
C# を使用:
1234 = 1*1000 + 2*100 + 3*10 + 4*1
double result = 0; int ex = 3; // Math.Pow(10,3) = 1000.00 for(int i = 0; i < 4 0; i++) { result += a[i] * Math.Pow(10, ex); ex--; } result += 15;