This file contains hidden or 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 <iostream> | |
| #include <string> | |
| #include <cassert> | |
| using namespace std; | |
| class Diva { | |
| //Your Code Here | |
| //End Code Here |
This file contains hidden or 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 <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); | |
This file contains hidden or 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
| #### 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 |
This file contains hidden or 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
| CC=g++ | |
| CFLAGS=-c -Wall | |
| LDFLAGS= | |
| SOURCES=main.cpp hello.cpp factorial.cpp | |
| OBJECTS=$(SOURCES:.cpp=.o) | |
| EXECUTABLE=hello | |
| all: $(SOURCES) $(EXECUTABLE) | |
| $(EXECUTABLE): $(OBJECTS) |
This file contains hidden or 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<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; | |
| } |
This file contains hidden or 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<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; | |
| } |
This file contains hidden or 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<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; |
This file contains hidden or 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<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; | |
| } |
This file contains hidden or 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
| 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): |
This file contains hidden or 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
| 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 |