Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip>
- #include<cmath>
- #include <algorithm>
- using namespace std;
- void Ahmed_Negm(){
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main()
- {Ahmed_Negm();
- double num1, num2, num3;
- cin>>num1>>num2>>num3;
- double res = (num1 * num2) / num3;
- long long nres = res;
- double myres = res - nres;
- if(nres <= 2147483647 && myres == 0){
- cout<<"int";
- }else if(myres != 0){
- cout<<"double";
- }else{
- cout<<"long long";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment