Skip to content

Instantly share code, notes, and snippets.

View AndyNovo's full-sized avatar

Andy Novocin AndyNovo

View GitHub Profile
#include <iostream>
#include <string>
#include <cassert>
using namespace std;
class Diva {
//Your Code Here
//End Code Here
#include <iostream>
#include <forward_list>
using namespace std;
int main() {
forward_list<int> sll;
sll.push_front(231);
sll.push_front(321);
sll.push_front(666);
#### PROJECT SETTINGS ####
# The name of the executable to be created
BIN_NAME := hello
# Compiler used
CXX ?= g++
# Extension of source files used in the project
SRC_EXT = cpp
# Path to the source directory, relative to the makefile
SRC_PATH = .
# Space-separated pkg-config libraries used by this project
CC=g++
CFLAGS=-c -Wall
LDFLAGS=
SOURCES=main.cpp hello.cpp factorial.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=hello
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
#include<iostream>
#include<string>
int main(){
std::string number_of_rounds;
std::cin >> number_of_rounds;
int j = 0;
for(int i = 0; i < number_of_rounds.length(); i++){
j = i;
}
#include<iostream>
#include<string>
int main(){
unsigned long number_to_hit;
std::cin >> number_to_hit;
unsigned long j = 0;
for(unsigned long i = 0; j < number_to_hit; i++){
j = i * i;
}
@AndyNovo
AndyNovo / linear.cpp
Last active September 21, 2015 19:50
#include<iostream>
int main(){
unsigned long number_of_rounds = 0;
std::cin >> number_of_rounds;
unsigned long j = 0;
for(unsigned long i = 0; i < number_of_rounds; i++){
j = i;
}
return 0;
#include<iostream>
int main(){
int number_of_rounds = 0;
std::cin >> number_of_rounds;
int k = 0;
for(int i = 0; i < number_of_rounds; i++){
for(int j = 0; j < number_of_rounds; j++){
k = j;
}
import random, os, sys, time
#Animate some ASCII art (thanks Philip: http://stackoverflow.com/a/2785568/1347629)
def draw_to_screen(content):
clear_console = 'clear' if os.name == 'posix' else 'CLS'
os.system(clear_console)
sys.stdout.write(content)
sys.stdout.flush()
time.sleep(0.2)
def board(w, h, x, y):
@AndyNovo
AndyNovo / tree.py
Created September 15, 2015 18:26
ASCII Christmas Tree with Snow
import random, os, sys, time
#Animate some ASCII art (thanks Philip: http://stackoverflow.com/a/2785568/1347629)
def draw_to_screen(content):
clear_console = 'clear' if os.name == 'posix' else 'CLS'
os.system(clear_console)
sys.stdout.write(content)
sys.stdout.flush()
time.sleep(0.2)
#Some randomized snow