View plurality.c
#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 |
View substitution.c
// 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! |
View readability.c
// 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 |
View mario.c
// mario.c | |
// | |
// prints pyrimid block wall with stair step on both sides with valley of | |
// spaces in the middle | |
// | |
// Sample output | |
// | |
// Height: | |
// 4 | |
// # # |