#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include<math.h>
int main()
{
int x;
x=0;
int z;
z=3;
int j;
j=1;
int y;
printf("algo aqui \n");
y=(x>5)?100:200;
printf("%d\n",y);
printf("algo aqui \n");
y=(x>=5)?1:0;
printf("%d\n",y);
printf("algo aqui \n");
y=(x>5)?j:z;
printf("%d\n",y);
printf("algo aqui \n");
y=(x<=5)?j:z;
printf("%d\n",y);
printf("algo aqui \n");
y=(x)?z+j:z-j;
printf("%d\n",y);
printf("algo aqui \n");
y=(x>=0)?sqrt(x):0;
printf("%d\n",y);
int a,b,c,d;
a=1; b=2; c=3; d=0;
d=(a)?c*b:10;
printf("si negamos a %d\n",d);
getch();
return 0;
}
No hay comentarios:
Publicar un comentario