This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <cs50.h> | |
#include <string.h> | |
#include <ctype.h> | |
// Prototypes | |
int getPoints(string word); | |
// Global variables |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
#include <math.h> | |
int getAmountOfDigits(long number); | |
int getFirstDigit(long numberToCheck); | |
int getFirstTwoDigits(long numberToCheck); | |
bool isChecksumValid(int checksum); | |
int main(void){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
int main(void){ | |
// Get integer (cents) from user | |
// Repeat this prompt until the user enters a value higher than 0 | |
int change; | |
do{ | |
change = get_int("Change owed: "); | |
} while (change < 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
void print_row(int spaces,int bricks); | |
int main(void){ | |
// Get the height of the pyramid | |
// This is also the width of the bottom row | |
// If the height is 3, the bottom row is 3 bricks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
void print_row(int spaces,int bricks); | |
int main(void){ | |
// Get the height of the pyramid | |
// This is also the width of the bottom row | |
// If the height is 3, the bottom row is 3 bricks |