Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

logical operators in C

Name: Roberto Pastrana 2009-04-24 0:12

Hi /prog/
I need to do this exact thing, but only using logical operators

it prints "OP is a faggot" when one of the numbers is negative and the other is 0 or positive
-----------------------------------------
#include <stdio.h>

int main ()

{
    int a;
    int b;

    puts("Ingrese un valor.\n");
    scanf("%d", a)
    puts("Ingrese otro valor.\n");
    scanf("%d", b)

    if (a<0)
    {
        if (b>=0)
        {
            puts "OP is a faggot"
        }
    } else {
        if (b<0)
        {
            puts "OP is a faggot"   
        }
    }
}
-----------------------------------------

Name: Anonymous 2009-04-24 18:18

Use Karnaugh maps.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List