#include <iostream>
#include <limits>
using namespace std;
int main( ) {
float n;
cout << "Insira um inteiro." << endl;
while ( true ) {
cin >> n;
if ( ! cin .fail ( ) && n == ( int ) n) {
break ;
}
cout << n << " - Entrada nao corresponde ao tipo de variavel solicitado." << endl;
cin .clear ( ) ;
cin .ignore ( numeric_limits< streamsize> :: max ( ) , '\n ' ) ;
}
cout << endl << n << " - Entrada recebida com sucesso!!!" << endl;
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bGltaXRzPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglmbG9hdCBuOwoJY291dCA8PCAiSW5zaXJhIHVtIGludGVpcm8uIiA8PCBlbmRsOwoJd2hpbGUgKHRydWUpIHsKCQljaW4gPj4gbjsKCQlpZiAoIWNpbi5mYWlsKCkgJiYgbiA9PSAoaW50KW4pIHsKCQkJYnJlYWs7CgkJfQoJICAgIGNvdXQgPDwgbiA8PCAiIC0gRW50cmFkYSBuYW8gY29ycmVzcG9uZGUgYW8gdGlwbyBkZSB2YXJpYXZlbCBzb2xpY2l0YWRvLiIgPDwgZW5kbDsKCSAgICBjaW4uY2xlYXIoKTsKCSAgICBjaW4uaWdub3JlKG51bWVyaWNfbGltaXRzPHN0cmVhbXNpemU+OjptYXgoKSwgJ1xuJyk7Cgl9CQogICAgY291dCA8PCBlbmRsIDw8IG4gPDwgIiAtIEVudHJhZGEgcmVjZWJpZGEgY29tIHN1Y2Vzc28hISEiIDw8IGVuZGw7CiAJcmV0dXJuIDA7Cn0=