Skip to content

Instantly share code, notes, and snippets.

.LC0:
.string "ay"
.LC1:
.string "\nThis is the substring: %s\n"
.LC2:
.string "The first character of the word is %s\n"
.LC3:
.string "AyEnding: %s\n"
.LC4:
.string "Your word in Pig Latin is %s\n"
@0x000000AC
0x000000AC / ReverseIntWhile.c
Created June 8, 2015 03:07
Reversing an Int in a While() loop
#include <stdio.h>
int main(void)
{
int number, right_digit;
printf ("Enter your number.\n");
scanf ("%i", &number);
while ( number != 0 )
@0x000000AC
0x000000AC / RationalDriver.cpp
Created April 27, 2013 14:36
Driver to go with Rational.h
#include <iostream>
#include "Rational.h"
using namespace std;
enum MenuSelectionEnum
{
MENU_NONE = 0,
MENU_ADD = 1,
MENU_SUBTRACT = 2,
MENU_MULTIPLY = 3,
@0x000000AC
0x000000AC / Rational.h
Created April 27, 2013 14:32
Fraction header
// prevent multiple inclusions of header file
#include <iostream>
#ifndef RATIONAL_H
#define RATIONAL_H
using namespace std;
class Rational
{
public:
@0x000000AC
0x000000AC / FractionArithmetic.cpp
Last active December 16, 2015 11:39
Arithmetic Operations on Factions
#include <iostream>
using namespace std;
enum MenuSelectionEnum
{
MENU_NONE = 0,
MENU_ADD = 1,
MENU_SUBTRACT = 2,
MENU_MULTIPLY = 3,
MENU_DIVIDE = 4,
/***********************************************************************
* Title: AaronClarkProg1.java
* Description:
* This program is the driver for APDissector.java and was created to
* fill partial requirements for CS219 at Park University. The basic
* ideas is that this driver instantiates a new APDissector object with
* the input shown below.
*
* Expected output:
* 1:919:882:5000
/***********************************************************************
* Title: ACDissector.java
* Description:
* Stores the phone number as a colon separated string of numbers
* and as four separate pieces:
* - colonSeparated "1:919:882:5000"
* - countryCode - stored as a String could hold 001
* - areaCode, prefix, number - stored as int
*
* Constructor:
#!/usr/bin/env python
# This is a continuation of the my playing with python on the Raspberry
# This program will functionally be a calculator that takes two different numeric imputs and then
# prompts the user what they want to do with them, in a super-simple fashion. The user enters
# two numbers, which are saved as longs'. Then, since I imported regular expressions, you can check
# the input text to meet one of the if, elif conditionals below it. For user input validation, I've
# placed the first number and second numbers in a while loop that throws an exception for invalid input.
import re
@0x000000AC
0x000000AC / ClarkAaronWeek3.java
Created December 2, 2012 21:54
From CS151, accepts input and checks certain conditions
/******************************************************************
* ClarkAaronWeek3.java
* Aaron P. Clark
*
* This program illustrates concepts learned from
* CS151 - Introduction to Programming. In particular
* the following from week 3:
* - Use the Scanner class to accept input from the user
* - Prompt the user for their first name, last name, and
* age each individually.
@0x000000AC
0x000000AC / LengthMethod.java
Created November 30, 2012 22:35
This program show swhat happens when you call the length method with strings of different lengths
/***********************************************
* LengthMethod.java
* Aaron P. Clark
*
* This program shows what happens when you call the length method with strings of different lenths.
***********************************************/
public class LengthMethod
{
public static void main(String[] args)