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
import random | |
import re | |
digits = ['0','1','2','3','4','5','6','7','8','9'] | |
while True: | |
num1 = random.choice(digits) | |
while num1 == '0': | |
num1 = random.choice(digits) | |
num2 = random.choice(digits) |
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
#include <iostream> | |
#include <fstream> | |
#include <conio.h> | |
#include <cmath> | |
using namespace std; | |
bool prime(unsigned long long int number){ | |
unsigned long long int limit = round(sqrt(number)); | |
unsigned long long int i = 3; | |
if (number%2 == 0 && number != 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
#include <iostream> // cout and cin | |
#include <cmath> // sqrt() | |
using namespace std; // cout and cin | |
void prime(long long int number) { | |
// Establishing Variables | |
long long int i = 5; | |
int w = 2; | |
const long long int lim = sqrt(number); |
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
import java.util.Scanner; | |
public class main { | |
// List has 5 parts to it | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
double[] list = {0, 0, 0, 0, 0}; | |
while (true) | |
{ | |
System.out.println("Enter 5 Numbers Pressing Enter Inbetween Each One."); | |
System.out.print("Number 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
/* | |
CONTROLS: | |
Up - Move Up | |
Down - Move Down | |
Left - Move Left | |
Right - Move Right | |
W - Zoom In | |
S - Zoom Out |
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
#include <string> | |
std::string convert(const unsigned short sBase, const std::string in, const unsigned short oBase){ | |
if(sBase > 92 || oBase > 92){ return "Base Is Too High!"; } | |
if(sBase < 2 || oBase < 2){ return "Base Is Too Low!"; } | |
#define ERR 255 | |
const unsigned short CHAR_TO_NUM[128] {ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,0,1,2,3,4,5,6,7,8,9,77,78,79,80,81,82,83,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,83,84,85,86,87,88,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,88,89,90,91,ERR}; | |
const char NUM_TO_CHAR[92] = {48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,58,59,60,61,62,63,91,92, |
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
#include <SFML/Graphics.hpp> | |
#include <cstdlib> | |
#include <cmath> | |
const static float height = 720; | |
const static float width = 1280; | |
const static float pHeight = 12; | |
const static float pWidth = 100; |
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
#include <SFML/Graphics.hpp> | |
#include <iostream> | |
#include <fstream> | |
const char* tabel = "$@B\%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\\|()1{}[]?-_+~<>i!lI;:,\"^`'. "; | |
const double length = 70.f; | |
const double mod = 256.f/length; | |
int main() | |
{ |
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
#include <SFML/Graphics.hpp> | |
int main() | |
{ | |
#define moveSet { movement = true; scale = startScale; } | |
#define reset { posx = -0.75; posy = 0; zoom = 1.13; startScale = 8; endScale = 1; scale = startScale; ITER = 16; BAIL = 4; movement = true; } | |
typedef long double decimal; // Change The Data Type If You Want | |
typedef unsigned int integer; // Change The Data Type If You Want | |
/// CONTANTS /// |
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
#include <SFML/Graphics.hpp> | |
typedef long double num; | |
const unsigned int w = 1200, h = 800; | |
sf::RenderWindow app(sf::VideoMode(w, h), "Mandelbrot Set"); | |
num x = 0, y = 0, zoom = 2; |
OlderNewer