Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- bool c_frac(int n1, int d1, int n2, int d2){
- double dn1=n1,dd1=d1,dn2=n2,dd2=d2;
- if ((dn1/dd1)<(dn2/dd2)) return true;
- else return false;
- }
- int main(){
- int n1,d1,n2,d2;
- cin >>n1>>d1>>n2>>d2;
- cout<<c_frac(n1,d1,n2,d2)<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment