| Task: | Säähavainnot |
| Sender: | adex720 |
| Submission time: | 2023-11-11 11:03:11 +0200 |
| Language: | C++ (C++20) |
| Status: | COMPILE ERROR |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:31:103: error: unable to find numeric literal operator 'operator""f'
31 | cout << ((int) (0.75 * (lampotilat[j] + ero) + 0.25 * (lampotilat[23] + ero2) * 10) / 10f) << " ";
| ^~~
input/code.cpp:31:103: note: use '-fext-numeric-literals' to enable more built-in suffixesCode
#include <bits/stdc++.h>
using namespace std;
// 0 p.
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
float korjaus = -0.14452499494142831;
int raja = 5;
double lampotilat[24];
for (int i = 0; i < n; i++)
{
for (int j = 0; j < 24; j++)
{
cin >> lampotilat[j];
}
float ero = (lampotilat[23] - lampotilat[0] - korjaus);
float ero2 = lampotilat[23] - (lampotilat[22] + lampotilat[21] + lampotilat[20]) / 3.0f;
for (int j = 0; j < 12; j++)
{
if (j < raja)
{
cout << ((int) (0.75 * (lampotilat[j] + ero) + 0.25 * (lampotilat[23] + ero2) * 10) / 10f) << " ";
}
else
{
cout << "? ";
}
}
}
}