Skip to content

Instantly share code, notes, and snippets.

View Xe's full-sized avatar
😂
h

Xe Iaso Xe

😂
h
View GitHub Profile
@Xe
Xe / Sieve.java
Created March 19, 2012 20:37
Sieve
import java.util.LinkedList;
import java.util.Queue;
//Sam Dodrill
//assgn page: http://penguin.ewu.edu/cscd300/Winter_12/Assignments/prog4.html
public class Sieve {
private Queue<Integer> primes = new LinkedList<Integer>();
private int lastMax = 0;
private int lastCount = 0;
class LinkedList {
private class Node {
public char data;
public Node next;
Node(char d, Node n) {
data = d;
next = n;
}
}
@Xe
Xe / main.c
Created April 13, 2012 02:46
Lab 3
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define ASSGN 7
#define QUIZ 8
#define EXAMS 2
#define FINAL 1
#define NAME 100
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* Sam Dodrill
* CSCD 240
* /dev/null is a bad input file
*/
@Xe
Xe / Makefile
Created April 17, 2012 17:27
Maze program
ZIP=dodrillshw2.zip
BIN=hw2
all:
clear
make clean
gcc -o ${BIN} -g *.c
test:
make
aasdf
LIBS=libcscd240fileutil.a
CC=gcc
NAME=dodrills
ASSIGN=lab11
#pseudo-variable FLAGS
all:
${CC} ${FLAGS} cscd240_s12_${ASSIGN}.c -o ${ASSIGN} ${LIBS}
debug:

Infix to Postfix and Postfix Eval of BigIntegers

Due Thursday, May 24th by 11:59:59pm

Basic documentation is required, but no javadoc is necessary -- UNLESS YOU DID NOT SUCCESSFULLY UTILIZE JAVADOC ON YOUR LAST ASSIGNMENT For this assignment you will convert infix expressions to postfix expressions and then evaluate those postfix expressions. You will be given a table of symbols (A - Z) and their associated values to be used in evaluating expressions. The value for each symbol is to be considered a BigInteger. Negative values are also possible. Following this table you will be given a series of strings which will contain INFIX expressions which may be fully or partially parenthesized, but will be valid. The infix expressions will be given one per line and the series of expressions will be terminated by a line containing only a #. You may assume the following about the INFIX expressions:

  • the expressions will contain only the characters: A through Z, +, -, *, /, ^, (, ). NOTE: ^ represents the exponent
[hashbang@pinkiepie pkg]$ sudo pacman -Sy irssi git
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
alarm is up to date
aur is up to date
resolving dependencies...
looking for inter-conflicts...