Is this a correct way to approach Boolean data type? › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 1: [C] – Data Types, Operators, Conditional Statements, Loops, and Command Line › Is this a correct way to approach Boolean data type? This topic has 0 replies, 1 voice, and was last updated 3 years, 6 months ago by admin. Viewing 1 post (of 1 total) Author Posts August 31, 2022 at 5:07 am #546 adminKeymaster Instead of creating a bool data type, I find it easier to create an int data type. If the criterion meets, int x = 1. [dm_code_snippet background=”yes” background-mobile=”no” slim=”yes” line-numbers=”yes” bg-color=”#abb8c3″ theme=”dark” language=”clike” wrapped=”yes” height=”” copy-text=”Copy Code” copy-confirmed=”Copied”] int f = checkforLuhn(y); if (f == 1) { LUHN = 1; } [/dm_code_snippet] Are the two ways indeed replaceable? Reply https://edstem.org/us/courses/176/discussion/1711556?[learn_press_profile] Author Posts Viewing 1 post (of 1 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In