#include <iostream>
using namespace std;
int main()
{
float n;
cin >> n;
if (n > 0 && (int)n == n)
cout << "Este natural";
}
else
cout << "Nu este natural";
Show life that you have a thousand reasons to smile
© Copyright 2024 DOKU.TIPS - All rights reserved.
#include <iostream>
using namespace std;
int main()
{
float n;
cin >> n;
if (n > 0 && (int)n == n)
{
cout << "Este natural";
}
else
{
cout << "Nu este natural";
}
}