• Skip to main content
  • Skip to footer

SoftwareProg.com

Software programming learning aide

  • Blog
    • Discussion
  • News
  • CS50’s Introduction to Computer Science by Harvard University on Edx
    • Week 1
    • Week 2
    • Week 3
    • Week 4
    • Week 5

Correct usage of or operator

CS50 threads to aide as a supplementary resource › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 1 › Correct usage of or operator

Tagged: Or operator in c

  • This topic is empty.
Log In Register Lost Password
Viewing 1 post (of 1 total)
  • Author
    Posts
  • August 29, 2022 at 4:46 am #518
    admin
    Keymaster

      I guess there is a syntactical error in if statement on line 68 while using or operator.


      Copy Code
      Copied
      Use a different Browser

      
      
      int checkifAmex (long y)
      {
          long x = y;
          if (x/1000000000000 == 34 or x/1000000000000 == 35)
          {
          return 1;
          }
          else
          {
          return 0;
          }
      }

      Help appreciated.

      Reply


      https://edstem.org/us/courses/176/discussion/1706076[learn_press_profile]

    • Author
      Posts
    Log In Register Lost Password
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Log In

    Log in / Register

    Initiative by Digital Splendid OPC Pvt. Ltd.