Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Logical Operators Practice | Operators
C Basics

book
Logical Operators Practice

Here's a summary of the primary logical operators:

SymbolNameUsage ExampleDescription
&&ANDa && ba AND b
||ORa || ba OR b
!NOT!aNOT a
Opgave

Swipe to start coding

Choose the appropriate comparison operators to ensure the expression evaluates to true (logical 1).

Løsning

#include <stdio.h>

int main()
{
int x = -6;

bool point = (x > -32 && x < 0);

printf("Is the expression logically correct?\n");
printf("%d\n", point);

return 0;
}

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 7
#include <stdio.h>

int main()
{
int x = -6;

bool point = (x ___ -32 && x ___ 0);

printf("Is the expression logically correct?\n");
printf("%d\n", point);

return 0;
}

Spørg AI

expand
ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

some-alt