habiba3azb

Untitled

Dec 5th, 2021
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4. int main() {
  5.     double a;
  6.     cin>>a;
  7.     int num=a;
  8.     double res =a-num;
  9.     if(res != 0){
  10.         cout<<"float "<<num<<" "<<res;
  11.  
  12.     }
  13.     else{
  14.         cout<<"int "<<num;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment