index | submit | rank | book

bool-not – Boolean negation

Write a program that reads several boolean values and prints their negation.

Input will consist of several lines containing either true or false. Output should contain a line with the negation of the given value: either true or false.

Example input


Example output


The submitted program should contain a negation function that receives one boolean as argument and returns a boolean. Please refer to the information for the chosen language:



In Python and Haskell, you can compare strings s1 and s2 using the equality operator:

s1 == s2

This operator also works with literal strings:

str == "hello"

In C, you can compare strings using the strcmp function:

strcmp(s1, s2) == 0

When the result of strcmp is 0 that means the given strings are equal. The strcmp function also works with literal strings:

strcmp(str, "hello") == 0

try first: hi base2base order

try next: bool-and-or

index | submit | rank | book

Copyright © 2020-2021 Rudy Matela
All rights reserved