Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .assets/installimage1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
target/
__pycache__/
build/
.env/
*.lock
package-lock.json
.ccls-cache/
node_modules/
5 changes: 5 additions & 0 deletions HOWTOCLONE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Zip
press on ![InstallImage1](.assets/installimage1.jpg)

## Git clone
`git clone https://github.com/btmclive/hello-world`
9 changes: 9 additions & 0 deletions c/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
C version

\<insert image here\>

![Preview](preview.jpg)

run with: `.\a.exe`

compile with: `gcc main.c`
Binary file added c/a.exe
Binary file not shown.
13 changes: 13 additions & 0 deletions c/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <stdio.h>

int main() {
char buf[64];
printf("Please rnter your name: ");
scanf_s("%s", &buf);

printf("\n");
printf("If you read this, you lost the Game.\n");
printf("Hello! My name is %s. I just lost the game. Incredible. yuh\n", buf);

return 0;
}
Binary file added c/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions cpp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Cpp (C++) version

\<insert image here\>

![Preview](preview.jpg)

run with: `.\a.exe`

compile with: `g++ main.cpp`
Binary file added cpp/a.exe
Binary file not shown.
14 changes: 14 additions & 0 deletions cpp/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <iostream>

int main() {
std::string buf;

std::cout << "Please enter your name: ";
std::cin >> buf;
std::cout << "\n";
std::cout << "If you read this, you lost the Game.\n";
std::cout << "Hello! My name is " + buf +
". I just lost the game. Incredible. yuh"
<< std::endl;
return 0;
}
Binary file added cpp/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Go version

\<insert image here\>

![Preview](preview.jpg)

run with: `.\main.exe`

compile with: `go build main.go`
Binary file added go/main.exe
Binary file not shown.
14 changes: 14 additions & 0 deletions go/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package main

import "fmt"

func main() {
var name string

fmt.Print("Please enter your name: ")
fmt.Scanln(&name)

fmt.Println("\nIf you read this, you lost the Game.")
ret := fmt.Sprintf("Hello! My name is %s. I just lost the game. Incredible. yuh", name)
fmt.Println(ret)
}
Binary file added go/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions html/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Hmtl/Javascript version

\<insert image here\>

![Preview](preview.jpg)

run with: just open the `index.html` in the browser
53 changes: 53 additions & 0 deletions html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<head>
<title>BMC'S GAME</title>
</head>
<style>
* {
margin: 0;
padding: 0;
}

.bold {
font-weight: bold;
}

.hide {
display: none;
}

img {
height: 2rem;
}

#background {
height: 100vh;
width: 100vw;
opacity: 10%;
position: absolute;
pointer-events: none;
}

</style>
<body>
<img id="background" src="https://i.imgur.com/ONkPzA8.png" />
<p>Please enter your name: </p>
<input id="name-input">
<button onClick="doStuff()" type="">Press Me!</button>
<div id="text-stuff" class="hide">
<p>If you read this, you lost the Game.</p>
<p>Hello! My name is <span id="name" class="bold">Ed</span>. I just lost the game. Incredible. yuh</p>
<img src="./someImage.jpg" alt="bmc">
</div>
<script>
function doStuff() {
let name_input = document.getElementById("name-input");
let name = document.getElementById("name");
let text_stuff = document.getElementById("text-stuff");
name.textContent = name_input.value;

text_stuff.classList.remove("hide");
}
</script>
</body>

5 changes: 5 additions & 0 deletions html/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"vscode-html-languageservice": "^5.3.1"
}
}
Binary file added html/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/someImage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions javascript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NodeJS version

\<insert image here\>

![Preview](preview.jpg)

run with: `node main.js`
11 changes: 11 additions & 0 deletions javascript/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const readline = require("node:readline");

const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});

rl.question("Please enter your name: ", name => {
console.log(`\nIf you read this, you lost the Game.\nHello! My name is ${name}. I just lost the game. Incredible. yuh`);
rl.close();
});
Binary file added javascript/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions lua/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Lua version

\<insert image here\>

![Preview](preview.jpg)

run with: `lua main.lua`
11 changes: 11 additions & 0 deletions lua/main.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

function main()
io.write("Enter your name: ")
name = io.read()
print()
print("If you read this, you lost the Game.")
print("Hello! My name is " .. name .. ". I just lost the game. Incredible. yuh")
end


main()
Binary file added lua/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Python version

\<insert image here\>

![Preview](preview.jpg)

run with: `python main.py`
11 changes: 11 additions & 0 deletions python/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def main() -> int:
name = input("Please enter your name: ")
print()
print("If you read this, you lost the Game.")
print(f"Hello! My name is {name}. I just lost the game. Incredible. yuh")

return 0

if __name__ == "__main__":
exit(main())

Binary file added python/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "rust"
version = "0.1.0"
edition = "2021"

[dependencies]
7 changes: 7 additions & 0 deletions rust/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Rust version

\<insert image here\>

![Preview](preview.jpg)

run with: `.\rust.exe`
Binary file added rust/preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added rust/rust.exe
Binary file not shown.
13 changes: 13 additions & 0 deletions rust/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use std::io::{stdin, stdout, Write};

fn main() {
print!("Please enter your name: ");
let _ = stdout().flush();
let mut buf = String::new();

stdin().read_line(&mut buf).unwrap();
let name = buf.trim_matches('\n').trim_matches('\r');
println!();
println!("If you read this, you lost the Game.");
println!("Hello! My name is {name}. I just lost the game. Incredible. yuh")
}