MCPcopy Create free account
hub / github.com/E869120/math-algorithm-book / main

Function main

codes/cpp/Code_3_04_2.cpp:7–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5double Answer = 0.0;
6
7int main() {
8 // ����
9 cin >> N;
10 for (int i = 1; i <= N; i++) cin >> P[i] >> Q[i];
11
12 // �����̌v�Z �� �����̏o��
13 for (int i = 1; i <= N; i++) {
14 Answer += 1.0 * Q[i] / P[i];
15 }
16 printf("%.12lf\n", Answer);
17 return 0;
18}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected