Skip to content

source code

guvenaltunsoy edited this page Mar 10, 2020 · 2 revisions

Reference code like types or methods inline.

Do not pass arbitrary Objects to methods that accept Strings!

Output literal monospace text such as {backtick} by enclosing the text in pluses, then in backticks.

Indent the line one space to insert a code snippet
error: The requested operation returned error: 1954 Forbidden search for defensive operations manual
absolutely fatal: operation initiation lost in the dodecahedron of doom
would you like to die again? y/n
Gemfile.lock
GEM
  remote: https://rubygems.org/
  specs:
    asciidoctor (1.5.6.1)

PLATFORMS
  ruby

DEPENDENCIES
  asciidoctor (~> 1.5.6.1)
app.rb
require 'sinatra'

get '/hi' do
  "Hello World!"
end
#!/bin/bash
addition(){
   sum=$(($1+$2))
   return $sum
}
read -p "Bir rakam girin: " int1
read -p "Bir rakam girin: " int2
add $int1 $int2
echo "Sonuc : " $?
require 'sinatra' // (1)

get '/hi' do // (2)
  "Hello World!" // (3)
end
  1. Library import

  2. URL mapping

  3. HTTP response body

line of code  // (1)
line of code  # (2)
line of code  ;; (3)
line of code  <!--(4)-->
  1. A callout behind a line comment for C-style languages.

  2. A callout behind a line comment for Ruby, Python, Perl, etc.

  3. A callout behind a line comment for Clojure.

  4. A callout behind a line comment for XML or SGML languages like HTML.

<section>
  <title>Section Title</title> <!--(1)-->
</section>
  1. The section title is required.

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    double number, squareRoot;
    cout << "Enter a number: ";
    cin >> number;

    // sqrt() is a library function to calculate square root
    squareRoot = sqrt(number);
    cout << "Square root of " << number << " = " << squareRoot;
    return 0;
}
Clone this wiki locally