'commit'
This commit is contained in:
12
TangDou/LuoGuBook/L4_12_2.cpp
Normal file
12
TangDou/LuoGuBook/L4_12_2.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
const double eps = 1e-6;
|
||||
int main() {
|
||||
int n;
|
||||
double s = 0;
|
||||
cin >> n;
|
||||
for (double i = 0.1; n - i > eps; i += 0.1) s += i;
|
||||
cout << s;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user