Ternary operator.

?

See version :

Pas de dépendances

Download :

#include <stdio.h>

int main()
{
    int n,a;
    printf("Entrez un nombre : ");
    scanf("%d",&n);
    a = (n<0)?(-n):(n);
    printf("Valeur absolue : %d\n",a);
    return 0;
}



Explanations

	No explanations yet.