• Skip to main content
  • Skip to footer

CS50's Introduction to Computer Science on Edx: Supplementary resource

CS50 threads to aide as a supplementary resource

Scrabble lab: Adding #define for POINTS

CS50 threads to aide as a supplementary resource › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 2 › Scrabble lab: Adding #define for POINTS

Tagged: define command, define function

  • This topic is empty.
Log In Register Lost Password
Viewing 1 post (of 1 total)
  • Author
    Posts
  • October 3, 2022 at 11:30 am #732
    admin
    Keymaster

      Since the number of letters are 26, I guess #define can be introduced. I tried to add but it does not work.


      Copy Code
      Copied
      Use a different Browser

      
      
      #include <cs50.h>
      #include <string.h>
      #include <ctype.h>
      #include <stdio.h>
      #define POINTS 26
      
      
      int compute_score (string word);
      string decide_winner (int score1, int score2);
      
      int POINTS[] = {1, 3, 3, 2, 1, 4, 2, 4, 1, 8, 5, 1, 3, 1, 1, 3, 10, 1, 1, 1, 1, 4, 4, 8, 4, 10};
      
      int main (void)
      {
      
      }
      
      

       

       

      Is there any formatting error?


      Reply


      https://edstem.org/us/courses/176/discussion/1876752[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.