[ create a new paste ] login | about

yhl20001210

Name: Hanlin Yang
Email:
Site/Blog: http://codepad.org/users/yhl20001210
Location: China
Default language: C++
Favorite languages: C, C++, Python, <del>PHP</del>, ...
About: Fond of open source!

Saved pastes by yhl20001210:

C++, pasted on Mar 23:
1
2
3
4
5
// Fizz-Buzz: A more "engineer-ized" solution.

#include <iostream>
#include <string>
#include <sstream>
...
view (30 lines, 100 lines of output)
C++, pasted on Feb 24:
1
2
3
4
5
//DEBUGGING ON codepad
//coin_guess.cpp - imperfect

#include <cstdio>
#include <cstdlib>
...
view (36 lines, 87 lines of output)
C++, pasted on Feb 24:
1
2
3
4
5
//DEBUGGING ON codepad
//coin_guess.cpp - imperfect

#include <cstdio>
#include <cstdlib>
...
view (36 lines, 884 lines of output, 1 comment)
C++, pasted on Dec 31:
1
2
3
4
//DEBUGGING ON codepad

#include <iostream>
using std::cout;
...
view (9 lines, 65535 lines of output)
PHP, pasted on Dec 29:
1
2
3
<?php
    echo "Bored. Comments!\n";
?>
view (3 lines, 1 line of output, 25 comments)
C++, pasted on Dec 10:
1
2
3
4
5
//fizz_buzz.cpp
//To print "Fizz" if divided by 3, and "Buzz" if by 5; both if so. - Undbgged
//DEBUGGING ON codepad

#include <iostream>
...
view (18 lines, 100 lines of output, 2 comments)
C++, pasted on Dec 10:
1
2
3
4
5
//fizz_buzz.cpp
//To print "Fizz" if divided by 3, and "Buzz" if by 5; both if so. - Undbgged
//DEBUGGING ON codepad

#include <iostream>
...
view (16 lines, 100 lines of output, 1 comment)
C++, pasted on Nov 12:
1
2
3
4
5
//temp_0x00000001.cpp
//To verify the 13th on the mathematics (of science subjects) paper of the Exam of the Union of "Known Schools in Northern Anhui". - Quick programming
//DEBUGGING ON codepad

#include <iostream>
...
view (21 lines, 12 lines of output, 1 comment)
PHP, pasted on Nov 11:
1
2
3
<?
 phpinfo()
?>
view (3 lines, 322 lines of output, 1 comment)
C++, pasted on Nov 5:
1
2
3
4
5
//bin_tree-DEMO.cpp
//A binary tree and operations on it.
//Foreword: For something to submit to a algorithm competition with some difficulty as this, it seems too complicated.

#include <iostream>
...
view (123 lines, 2 lines of output, 1 comment)
C++, pasted on Nov 5:
1
2
3
4
5
//bin_tree-DEMO.cpp
//A binary tree and operations on it.
//Foreword: For something to submit to a algorithm competition with some difficulty as this, it seems too complicated.

#include <iostream>
...
view (125 lines, 2 lines of output)
C++, pasted on Aug 26:
1
2
3
4
5
//17_fibonacci.cpp
//To calculate the n-th number of the Fibonacci sequence. - Using memorized search, without a vector but a GLOBAL array
//DEBUGGING ON codepad

#include <iostream>
...
view (36 lines, 402 lines of output)
C++, pasted on Aug 26:
1
2
3
4
5
//17_fibonacci.cpp
//To calculate the n-th number of the Fibonacci sequence. - Using memorized search, without a vector but a GLOBAL array
//DEBUGGING ON codepad

#include <iostream>
...
view (36 lines, 402 lines of output)
C++, pasted on Aug 25:
1
2
3
4
//17_fibonacci.cpp
//To calculate the n-th number of the Fibonacci sequence. - Using memorized search, without a vector but a GLOBAL array

#include <iostream>
...
view (31 lines, 38 lines of output)
C++, pasted on Aug 25:
1
2
3
4
//17_fibonacci.cpp
//To calculate the n-th number of the Fibonacci sequence. - Using memorized search, without a vector but a GLOBAL array

#include <iostream>
...
view (31 lines, 38 lines of output)
C++, pasted on Aug 25:
1
2
3
4
//17_fibonacci.cpp
//To calculate the n-th number of the Fibonacci sequence. - Using memorized search, without a vector but a GLOBAL array

#include <iostream>
...
view (26 lines, 1 line of output)
C++, pasted on Aug 20:
1
2
3
4
5
#include <cstdio>
#define SUM (SS+Ss+ss)

int main() {
    const int MAX_YEAR=100;
...
view (16 lines, 100 lines of output, 5 comments)
C++, pasted on Aug 2:
1
2
3
4
5
//20_double_formula.cpp
//To calculate the roots of a "double" formula.

#include <cmath>
#include <cstdio>
...
view (20 lines, 9 lines of output)
Python, pasted on Jul 24:
1
2
print("Use \\n instead of std::endl")
print("http://tieba.baidu.com/f?kz=2534025916")
view (2 lines, 2 lines of output)
Python, pasted on Jul 21:
1
2
3
4
5
print('Welcome to use codepad.')
print('You could paste or type codes here, making it run for you.')
print('However, codepad does not support inputing information.')
print('You may could make a function to produce a string and read by scan functions.')
print('You could also use ideone on ideone.com to do more complex and complete work.')
...
view (6 lines, 6 lines of output)
C++, pasted on Jul 21:
1
2
3
4
5
//narciss_num.cpp
//To find the Narcissistic numbers between 100 and 999.

#include <iostream>
using std::cout;
...
view (16 lines, 6 lines of output)
Python, pasted on Jul 21:
1
2
3
4
print "My version"
print 'Old version'
print('New version\n')
print('Python is fast!')
view (4 lines, 5 lines of output)
C++, pasted on Jul 21:
1
2
3
4
5
#include <iostream>
using std::cout;

int main() {
    cout<<"C++ is strong!";
...
view (7 lines, 1 line of output)
Python, pasted on Jul 21:
1
2
3
a=1
b=2
print a+b
view (3 lines, 1 line of output, 3 comments)
Python, pasted on Jul 21:
1
print "Python is fast!"
view (1 line, 1 line of output, 1 comment)