#include <cstdio> using namespace std; int main() { double n; while (EOF != scanf("%lf", &n)) { double sum = n; sum += n; n /= 2; sum += n; n /= 2; sum += n; n /= 2; sum += n; n /= 2; n /= 2; printf("%lf\n", sum); printf("%lf\n", n); } return 0; }
#include <cstdio> using namespace std; int main() { double n; while (EOF != scanf("%lf", &n)) { double sum = n; sum += n; n /= 2; sum += n; n /= 2; sum += n; n /= 2; sum += n; n /= 2; n /= 2; printf("%lf\n", sum); printf("%lf\n", n); } return 0; }