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.
私のコードでは、正しい除算ができません。理由はわかりません
たとえば、
int N =5; int df = 2; double value = N/df;
前のコードを使用すると、値 = 2 が得られ、2.5 を返す必要があります
また、計算に double 値を追加することもできます
double N =5; double df = 2; double value = N*1.0/df;