This file contains 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 <string.h> | |
// Implement a program that runs a plurality election, per the below. | |
// $ ./plurality Alice Bob Charlie | |
// Number of voters: 4 | |
// Vote: Alice | |
// Vote: Bob |
This file contains 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
// substitution.c | |
// Implement a program that does a substitution cipher with a user supplied key | |
// Sample Usage | |
// $ ./substitution qwerTyuIopasDfghjKlzXcVbnm | |
// Text to encrypt: Wayne is the BEST programmer in the WORLD! | |
// plaintext:Wayne is the BEST programmer in the WORLD! | |
// ciphertext:Vqnft ol zit WTLZ hkgukqddtk of zit VGKSR! |
This file contains 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
// readability.c | |
// Design and implement a program, readability, that computes the Coleman-Liau index of the text. | |
// Implement your program in a file called readability.c in a directory called readability. | |
// Your program must prompt the user for a string of text (using get_string). | |
// Your program should count the number of letters, words, and sentences in the text. You may | |
// assume that a letter is any lowercase character from a to z or any uppercase character from | |
// A to Z, any sequence of characters separated by spaces should count as a word, and that any |
This file contains 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
// mario.c | |
// | |
// prints pyrimid block wall with stair step on both sides with valley of | |
// spaces in the middle | |
// | |
// Sample output | |
// | |
// Height: | |
// 4 | |
// # # |