martes, 3 de octubre de 2017

Programa de comparaciones...

#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{int A,B,C;
    printf("Trabajo de Antonio de Jesus Pasillas Contreras\n");
    printf("\nSi=1  No=0\n");
    A=8; B=15; C=3;
    printf("\nA > 3 = %d\n", A > 3);
    printf("\nA > C = %d\n", A > C);
    printf("\nA < C = %d\n", A < C);
    printf("\nB < C = %d\n", B < C);
    printf("\nB != C = %d\n", B !=C);
    printf("\nA == 3 = %d\n", A==3);
    printf("\nA * B == 15 = %d\n", A * B == 15);
    printf("\nA * B == -30 = %d\n", A * B == -30);
    printf("\nC / B < A = %d\n", C / B < A);
    printf("\nC / B == -10 = %d\n", C / B == -10);
    printf("\nC / B == -4 = %d\n", C / B == -4);
    printf("\nA + B + C == 5 = %d\n", A + B + C == 5);
    printf("\n(A + B == 8) && (A - B == 2) = %d\n", (A + B == 8) && (A - B == 2));
    printf("\n(A + B == 8) || (A - B == 6) = %d\n", (A - B == 8) || (A - B == 6));
    printf("\nA > 3 && B > 3 && C < -3 = %d\n", A > 3 && B > 3 && C < -3);
    printf("\nA > 3 && B >= 3 && C < -3 = %d\n", A > 3 && B >= 3 && C < -3);
    getch();
    return 0;}

No hay comentarios:

Publicar un comentario