My logic is working on every input I enter , I have even used float datatype to make sure that it decimal digits also work , negative numbers are also working in my logic
#include
using namespace std;
int main() {
float n1, n2, n3;
cin >> n1 >> n2 >> n3;
if(n1 >= n2 && n1 >= n3)
cout << "n1;
if(n2 >= n1 && n2 >= n3)
cout << n2;
if(n3 >= n1 && n3 >= n2)
cout << n3;
return 0;
}