int valor-absolut-positiu( int x )
{
int y;
si x > 0 ==> y=not(not(x));
si x < 0 ==> y=not(x);
si x == 0 ==> y=0;
si x == not(0) ==> y=0;
return(y);
}
int valor-absolut-negatiu( int x )
{
int y;
si x < 0 ==> y=not(not(x));
si x > 0 ==> y=not(x);
si x == not(0) ==> y=not(0);
si x == 0 ==> y=not(0);
return(y);
}
No hay comentarios:
Publicar un comentario