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
playsThe(anmarcus, accordion). | |
playsThe(anmarcus, percussion). | |
playsThe(mferguson, didgeriedoo). | |
playsThe(mferguson, trombone). | |
playsThe(avannorstrand, guitar). | |
playsThe(avannorstrand, fiddle). | |
playsThe(nvannorstrand, percussion). | |
playsThe(nvannorstrand, fiddle). | |
playsThe(mferguson, saw). | |
playsThe(aamarcus, concertina). |
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
// This is the main function. | |
// program MAIN; | |
#include <stdio.h> | |
int main(void) | |
{ | |
if(gamepoint<10) | |
{ | |
printf("Strike!"); |
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
/** @file inceptionish.c | |
@author Prof. Adams | |
@assistance Plot overview from Wikipedia [http://en.wikipedia.org/wiki/Inception] | |
@assistance Plot overview from Jamie LaFountain | |
@status funky | |
*/ | |
#include <stdio.h> | |
#include <stdbool.h> | |
/** Letter user enters for 'Dream' command in main menu */ |
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
Welcome to badams' program 5 | |
Please enter a number between 0 and 50: 0 | |
Please enter a number between 50 and 100: 100 | |
I'm thinking of a number. Can you guess it? Please enter a number between 0 and 100: 50 | |
Too high. Try again. I'm thinking of a number. Can you guess it? Please enter a number between 0 and 49: 25 | |
Too high. Try again. I'm thinking of a number. Can you guess it? Please enter a number between 0 and 24: 12 | |
Too high. Try again. I'm thinking of a number. Can you guess it? Please enter a number between 0 and 11: 5 | |
Too low. Try again. I'm thinking of a number. Can you guess it? Please enter a number between 6 and 11: 8 | |
Too low. Try again. I'm thinking of a number. Can you guess it? Please enter a number between 9 and 11: 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
/** | |
@brief Run the guessing game, using a FOR loop. | |
@param rounds How many guesses the user gets | |
@param low The smallest number that might be the target | |
@param high The biggest number that might be the target | |
@param target The number the user should guess | |
@returns how many times the user guessed correctly. | |
The user is prompted to enter a number between low and high. If correct, select a new target randomly between low and high, not the victory, and congratulate the user. Otherwise, change high or low (as appropriate) to the user's guess. |
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
Welcome to badams's Program 6 | |
(Part 0) Welcome to the Main Menu. Please select one of the following: | |
0: Display this lovely menu. | |
1: Total some numbers | |
2: Display ASCII codes for letters | |
3: Compute some Ulam numbers, whatever those are. | |
-1: Quit | |
Whatchawannado? -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
$ ./program_7_solution | |
MAIN MENU: | |
----------------------------------- | |
(a) Input data automatically | |
(b) Input data manually (BAD IDEA!) | |
----------------------------------- | |
(c) Display all array contents | |
(d) Display all contents, backward | |
(e) Display contents in a range | |
(f) Display evenly spaced contents |
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
-module(cs228records). | |
-export([listJobbers/2]). | |
listJobbers(NameOfJob, [CurrentRecord | RemainingRecords]) -> | |
case CurrentRecord of | |
{person, {name, UsefulName}, {job, NameOfJob}, _} -> | |
[ UsefulName | listJobbers(NameOfJob, RemainingRecords)] | |
; | |
{person, {name, UselessName}, {job, RandomJob}, {Label, Data}} -> | |
io:format("Ignoring the <~p-~p'ed> ~p, who is a ~p.~n", [Data, Label, UselessName, RandomJob]), |
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
4/5 * 4/9 = 16/45 | |
1/3 + 5/9 = 8/9 | |
2/5 * 1/6 = 1/15 | |
1/1 + 2/1 = 3/1 | |
4/5 * 1/3 = 4/15 | |
2/5 + 5/4 = 33/20 | |
1/4 * 10/9 = 5/18 | |
7/6 + 8/7 = 97/42 | |
3/8 * 1/4 = 3/32 | |
1/1 + 5/1 = 6/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
eclipse:cs131 badams$ clang cs131_program_final_badams.c -o bubblesort | |
eclipse:cs131 badams$ ./bubblesort | |
Bad syntax. Instead try: | |
./bubblesort 3 1 4 1 5 9 2 6 5 3 5 7 | |
Or... | |
./bubblesort verbose 3 1 4 1 5 9 2 6 5 3 5 7 | |
eclipse:cs131 badams$ |