Cod sursa(job #562730)

Utilizator grass13Gaby Dobrea grass13 Data 23 martie 2011 19:31:49
Problema A+B Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.26 kb

#include<iostream.h>
#include<math.h>
int a,b,aux;
double x,y;
int main ()
{
cout<<"x=";cin>>x;
cout<<"y=";cin>>y;
a=(int) (x*y);
b=(int) (x/y);
if (a<b)
{aux=a;
a=b;
b=aux;
}
if (x!= floor(x))
cout<<a<<' '<<b;
else
cout<<b<<' '<<a;
return 0;
}