What is wrong with this code for problem code HS08TEST

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
int main()
{
    float num[2];
    cin>>num[0]>>num[1];
    int x;
    x = int(num[0]);
    if (x%5 != 0 || x>num[1])
    {
        cout<<num[1]<<endl;
    }
    else
    {
        float res;
        res = num[1] - num[0];
        res = res - 0.5;
        cout << fixed << setprecision(2) << res;
    }
}