Shortest Code Challenge

From Esolang
Jump to navigation Jump to search
This article is not detailed enough and needs to be expanded. Please help us by adding some more information.

Shortest Code Challenge is arranged from One Line Challenge.

Here is something of this challenge.

Python

One!

print("Hello, world!")

Two!

a = int(input()); b = int(input()); c = a + b; print(c)

Note: PEP-8 makes it clear that it's best not to write code like this.

C++

Note: Code that starts with a hashtag cannot be written on a single line with code that starts with not a hashtag(except for comments).

One!

#include<iostream>
using namespace std; int a, b, c; int main(){cin >> a >> b; c = a + b; cout << c << endl; return 0;}

Two!

#include<bits/stdc++.h>
using namespace std; int main(){for(int i = 0; i < 10; i++){printf("%d, ", i);} return 0;}