Questions tagged [boolean]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 views

Week 2 Lecture - Functions - Valid Triangle

This is from the functions lecture on a valid triangle. I'm not getting any error messages but I can't figure out why the bool valid_triangle (float x, float y, float z) function is not working. Any ...
0
votes
1answer
23 views

Week 2: valid_triangle function example — compiling [errors]

This goes to week 2: Functions mini lecture. We create a custom function for verifying whether we have a valid triangle by assessing it's 3 sides. I wanted to elaborate on the code. Since, this ...
0
votes
2answers
23 views

Else If Boolean Statements of Equality In the Case of Complex Numbers

In the lecture for Week 1, Professor Malan said that in an if statement, the third boolean expression (else if (x ==y)) is redundant or implied, since logically, if it is false that a number is ...
0
votes
1answer
22 views

What's in the bool function parenthesis?

hope everyone is staying safe. I just want to understand what's inside the parenthesis of the vote function in pset3 - Tideman: bool vote(int rank, string name, int ranks[]) What does it mean to ...
0
votes
1answer
44 views

Pset3 is_rest does not compile right?

I have some code I have written to test whether a blank line has been reached in the music file but I am not familiar with how to return a Boolean statement as true in C. When I run make I am getting ...
0
votes
1answer
113 views

What is the return value when isalpha() evaluates to true?

I was running into an issue with my program for Vigenere's Cipher and singled it out to a problem with the equivalence of the value that is returned from isalpha() and the boolean "true". I now know ...
1
vote
2answers
101 views

Pset4 recover.c compiles, but can't seem to print Jpgs at all

Am starting a new thread as I'm having trouble understanding what is wrong with the code.. I've added printf statements at the jpgCheck function and did not get a print. I suspect it's the function? ...
2
votes
2answers
644 views

Pset4 recover, comparing hex in if statements

I'm trying to solve "recover" but, I'm unable to compare my if statements. This is my error message: error: comparison of constant 224 with expression of type 'char' is always false [-...
0
votes
1answer
88 views

pset2 caeser boolean returns

when running the code below with a command line ./caesartest 2, I get the false return 1, not the true, what is wrong? (I began having the trouble after including isdigit)... #include <cs50.h> #...
0
votes
1answer
135 views

A question about boolean expressions

I want to ask if there is a way to tell your programme to proceed with the code only when a boolean expression is false (not "true" as usual) and if the answer is yes, could you give me an example of ...
0
votes
1answer
1k views

PSET8 - MASHUP : Can't find FULLTEXT indexes when using WITH QUERY EXPANSION

I'm working on the final pset, more specifically on the search.php file. I've figured out how to use query() and I'm actually taking advantage of print(json_encode($places, JSON_PRETTY_PRINT)); to ...
0
votes
1answer
69 views

code doesn'work, please help

I tried to write this little piece of code, but I couldn't figure it out entirely. Can someone help me with the missing parts? #include <stdio.h> #include <cs50.h> int main(void) { ...