#include<conio.h>
#include<iostream.h>
float x,y,z,r;
int main(){
cout <<"introduce 'x': ";
cin>>x;
cout<<"introduce 'y': ";
cin>>y;
if ((x<=100)&&(x>=0)&&(y>=0)&&(y<=100)){
r=x-y;
if(r>0){
z=x/y;
}
if(r==0){
z=y*x;
}
if (r<0){
z=y/x;
}
cout<<"x="<<x <<" y="<<y <<" z="<< z;
}else{
cout<<" introduce numeros entre 0 y 100" ;
}
getch();
return 0;
}
No hay comentarios:
Publicar un comentario