C

@corrupt

Loops2.java

Java
2 years ago
import java.util.*; import static java.lang.System.*; import java.util.Random; public class Loops2 { public static void main (String[] args) { Scanner reader = new Scanner ( System.in ); int score1 = 0; int score2 = 0; int score3 = 0;

Chore simulator

Lua
2 years ago
local CHORES = { ["Dishes"] = { Available = true, Exclusive = false, }, ["Laundry"] = { Available = true, Exclusive = false, },

Cases and inputs

C++
2 years ago
#include <iostream> #include <ctime> #include <cmath> using namespace std; void Options(int input) { switch(input) { case 1: cout << "This is case 1!" << endl;

Rand.cpp

C++
2 years ago
#include <iostream> #include <string> #include <cstdlib> #include <ctime> using namespace std; int main() { string s_max; string s_min;

Rand.cpp

C++
2 years ago
#include <iostream> #include <string> #include <cmath> using namespace std; int main() { string s_max; string s_min;

Break and continue.cpp

C++
2 years ago
#include <iostream> // Input/Output library #include <cmath> // Math library for C/C++ #include <string> // String library (used for user inputs) using namespace std; // Namespace for easier outputs int main() { // Main /* // Gets the user input

Day Of the Week (Cases)

C++
2 years ago
#include <iostream> #include <string> int main() { std::string s_day; std::cout << "Day of the week (numeric form): " << std::endl; std::cin >> s_day; int day;

try, throw, catch

C++
2 years ago
#include <iostream> int main() { try { int age = 15; if (age >= 18) { std::cout << "Access granted - you are old enough."; } else { throw (age); }

TEST_THING

C++
2 years ago
// Example program #include <iostream> // Library required for printing #include <string> // Library required for getting strings and inputs #include <typeinfo> // Library required for checking a variable data type float Calculate(float val1, float val2, char OPERATOR) { // Calculates a result from two numeric values and a desired operator if (OPERATOR == '+') { // ADDITION return val1 + val2; // A + B = C } else if (OPERATOR == '-') { // SUBTRACTION

CarpetLab.java

Java
2 years ago
/* NAME: penis Determine the cost to carpet a room when given the measurements and the cost per square yard. */ import java.util.*; public class CarpetLab {

t

Lua
2 years ago
https://mosaiccng.agilixbuzz.com/ https://pynative.com/python-datetime-format-strftime/#:~:text=Use%20datetime.,hh%3Amm%3Ass%20format.

Date and Time (Lua)

Lua
2 years ago
print("Weekday (Abbreviated)", os.date("%a", os.time())) print("Weekday (Full)", os.date("%A", os.time())) print("Month (Abbreviated)", os.date("%b", os.time())) print("Month (Full)", os.date("%B", os.time())) print("Date and Time", os.date("%c", os.time())) print("Day", os.date("%d", os.time())) print("Hour (24 hours)", os.date("%H", os.time())) print("Hour (12 hours)", os.date("%I", os.time())) print("Minute", os.date("%M", os.time())) print("Month", os.date("%m", os.time()))

Elapsed time

Lua
2 years ago
local x = os.clock() local s = 0 for i = 1, 100000 do s = s + i end print(string.format("elapsed time: %.2f\n", os.clock() - x))

Carpetlab.java

Java
2 years ago
// Determine the cost to carpet a room when given the measurements // and the cost per square yard. import java.util.*; public class CarpetLab { public static void main ( String[] args ) { Scanner scan = new Scanner ( System.in );

Triangletype.java

Java
2 years ago
/* Name: penis Purpose: Calculates by three individual inputs if it's a triangle, prints whether it is or isn't, prints what type of triangle it is, and it's area. */ import java.util.*; // Java tools public class Triangletype { public static void main(String[] args) {

PowerTest.lua

Lua
2 years ago
local pTOTAL = 1000 -- total points local RANDOM = true local CAMS = { ShowStage = "1A", DiningArea = "1B", PiratesCove = "1C", WestHall = "2A", WestCorner = "2B",

fix.java

Java
2 years ago
public static boolean isTriangle(int a, int b, int c) { if (a >= b + c || b >= a + b || c >= a + b) { return false; } else { return true; } } public static String determineType(int a, int b, int c) { if (a == b && b == c & c == a) {

TEST

Lua
2 years ago
local STATS = { dEAST = { Uses = math.random(1, 210), -- per night isActive = false, Cooldown = 0.5, }, dWEST = { Uses = math.random(1, 210), isActive = false,

TriangleTypes.java

Java
2 years ago
/* Name: penis */ import java.util.*; public class Triangletype { public static void main(String[] args) { Scanner in = new Scanner(System.in);

Power

Lua
2 years ago
local P_POWER = 1 _G.HARDMODE = false local Stats = { E_DOOR = math.random(1, 42), W_DOOR = math.random(1, 42), CAM_FLIPS = math.random(1, 42), E_LIGHT = math.random(1, 42), W_LIGHT = math.random(1, 42) }