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> | |
// function prototypes | |
void insertion_sort(int arr[], int n); | |
void print_array(int arr[], int n); | |
// size of array | |
#define SIZE 10 |
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> | |
// function prototypes | |
void selection_sort(int arr[], int size); | |
void print_array(int arr[], int size); | |
// size of array | |
#define SIZE 10 |
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> | |
// function prototypes | |
void bubble_sort(int arr[], int size); | |
void print_array(int arr[], int size); | |
// size of array | |
#define SIZE 10 |
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> | |
#define NUMBERS_ON_CARD 24 | |
// function prototype | |
bool linear_search(int arr[], int n, int size); | |
// Numbers on bingo card | |
int bingo_card[] = {7, 14, 4, 9, 6, 26, 22, 24, 20, 28, 40, 34, 36, 35, 58, 55, 46, 52, 49, 73, 68, 72, 74, 64}; |
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 <stdio.h> | |
#include <cs50.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
int main(int argc, string argv[]) | |
{ | |
if (argc != 2) |
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<stdio.h> | |
#include<cs50.h> | |
#include "multiplication.h" | |
int main(void) | |
{ | |
//To Do: Write a function to prompt the user for numberA and numberB | |
int A = get_int(":"); | |
int B = get_int(":"); | |
//To Do: Write a function to return the product of numberA and numberB. "The product of the number is: " |
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 <stdio.h> | |
#include <cs50.h> | |
#include <math.h> | |
#define BASE 2 | |
// returns true if binary, false if not binary | |
bool check_binary(int b) | |
{ | |
while (b > 0) |
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> | |
int main(void) | |
{ | |
// get a string named plaintext | |
string plaintext = get_string("plaintext: "); |
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> | |
int main(int argc, string argv[]) | |
{ | |
if (argc != 3) | |
{ | |
printf("Usage: ./exit <firstname> <lastname>\n"); | |
return 1; | |
} |
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> | |
int main(int argc, string argv[]) | |
{ | |
if (argc != 2) | |
{ | |
printf("You need to provide the name in the command line.\n"); | |
return 1; |
NewerOlder