From Esolang
Jump to navigation Jump to search

Brief Introduction

Totrandom is a totally random joke language.

The program contains only a number and anything other than a number will be concerned as a SYNTAX ERROR.

The number means the length of the output, and the program will output a random string of the length. Each character in the string is chosen from \x00 to \xFF.

Example Programs

Hello, World!

This program has a chance of 1/25613 (about 0.00000 00000 00000 00000 00000 00000 04930 38065) of getting the output Hello, World!.



This program has a chance of 1/256 (about 0.00390 625) of getting the output 1, which makes it a quine.


Or this program with a chance of 1/32768 (about 0.00003 05175 78125) of getting the output 2[LF] or 2[EOF], which makes it a quine.




#include <bits/stdc++.h>
using namespace std;
#define int long long
int x;
signed main(){
	cin >> x;
	for(int i = 1; i <= x; i++)
		cout << (char)(rand() % 256);
	return 0;