Markdown Test

By Thomas Dang on Aug. 8, 2018, 2:10 a.m.

This is a test for the markdown editor on my website.

#include <iostream>

using namespace std;

int main()
{
    double result;
    int num1, num2;//operands      
    char oper;//operator
    char EQUAL = '=';

    cout << "Enter your first operand(has to be an integer): ";
    cin >> num1;
    cout << endl;

    cout << "Enter your second operand(has to be an integer): ";
    cin >> num2;
    cout << endl;

    cout << "Enter an operator: ";
    cin >> oper;
    cout << endl;

    switch(oper)
    {
    case '+': 
        result = num1 + num2;
        cout << "Result: " << num1 << " " << oper << " " << num2 << " " << EQUAL << " " << result << endl;
        break;
    case '-':
        result = num1 - num2;
        cout << "Result: " << num1 << " " << oper << " " << num2 << " " << EQUAL << " " << result << endl;
        break;
    case '*':
        result = num1 * num2;
        cout << "Result: " << num1 << " " << oper << " " << num2 << " " << EQUAL << " " << result << endl;
        break;
    case '/':
        result = static_cast<double> (num1) / num2; //static_cast<double> 
        if (num2 == 0)
        cout << "Result: " << num1 << " " << oper << " " << num2 << " " << EQUAL << " " << "undefined" << endl;
        else
        cout << "Result: " << num1 << " " << oper << " " << num2 << " " << EQUAL << " " << result << endl;
        break;
    case '%':
        result = num1 % num2;
        cout << "Result: " << num1 << " " << oper << " " << num2 << " " << EQUAL << " " << result << endl;
        break;
    default:
        cout << "The operator is out of range." << endl;
    }

    return 0;
}

H1

H2

H3

H4

H5
H6

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1

Alt-H2

Emphasis, aka italics, with asterisks or underscores.

Strong emphasis, aka bold, with asterisks or underscores.

Combined emphasis with asterisks and underscores.

Strikethrough uses two tildes. Scratch this.

  • a
  • b
  • c

I’m an inline-style link

I’m an inline-style link with title

I’m a reference-style link

I’m a relative reference to a repository file

You can use numbers for reference-style link definitions

Or leave it empty and use the link text itself.

URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or http://www.example.com and sometimes
example.com (but not on Github, for example).

Some text to show that the reference links can follow later.

Here’s our logo (hover to see the title text):

Inline-style:
alt text

Reference-style:
alt text

Here’s our logo (hover to see the title text):

02142014364.jpg

Blockquotes are very handy in email to emulate reply text.
This line is part of the same quote.

Quote break.

This is a very long line that will still be quoted properly when it wraps. Oh boy let’s keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put Markdown into a blockquote.

blog comments powered by Disqus