Skip to content

Instantly share code, notes, and snippets.

View nesffer's full-sized avatar

Nesffer nesffer

View GitHub Profile
#!/usr/bin/env python2
# coding: utf-8
from __future__ import print_function
import sys
import re
import json
import urllib
from colorama import init, Fore, Back, Style
URL = 'http://csearch.naver.com/dcontent/spellchecker.nhn'
@nesffer
nesffer / vending_machine.c
Last active August 29, 2015 14:19
자판기에 돈 넣고 동전 돌려받자
// 자판기에 돈 넣고 동전 돌려받자
#include <stdio.h>
int main() {
int coin, price, num, back, five, one;
printf("투입할 금액을 입력하세요: ");
scanf("%d", &coin);
printf("제품의 금액을 입력하세요: ");
@nesffer
nesffer / gist:700e9dec760db95cec07
Last active August 29, 2015 14:20
2015-04-27 No.1
#include <stdio.h>
int main() {
for (int i = 1; i <= 9; i++) {
for (int j = 1; j <= 9; j++) {
printf("%d", j);
}
printf("\n");
}
#include <stdio.h>
int main() {
for (int i = 1; i <= 20; i++) {
for (int a = 20; a > i; a--) {
printf(" ");
}
for (int j = 0; j < i; j++) {
printf("*");
}
#include <stdio.h>
int main() {
for (int i = 0; i < 20; i++) {
for (int a = 0; a < i; a++) {
printf(" ");
}
for (int j = 20; j > i; j--) {
printf("*");
}
@nesffer
nesffer / gist:0603b0c3f3ded7179b71
Last active August 29, 2015 14:20
2015-04-27 No.4
#include <stdio.h>
int main() {
for (int i = 0; i < 20; i++) {
for (int j = 20; j > i; j--) {
printf("*");
}
printf("\n");
}
# -*- coding: utf-8 -*-
# 랜덤 숫자 1~5
from random import randint
a = randint(1, 5)
b = randint(1, 5)
c = randint(1, 5)
# 랜덤 숫자 1~5
# a = 2
#include <stdio.h>
int main() {
int i, j;
printf("%22s\n\n", "구 구 단");
printf("%6s %8s %8s %8s\n", "2단", "3단", "4단", "5단");
for (i = 1; i < 10; i++) {
for (j = 2; j < 6; j++) {
printf("%d*%d = %2d ", j, i, i*j);
@nesffer
nesffer / gist:f5acccc03aa46572b1ea
Last active August 29, 2015 14:21
Array Element Move
#include <stdio.h>
#define RANGE 10
int main() {
int kk[RANGE] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
int i, j, move, temp;
printf("몇 번 이동 시키겠습니까? ");
scanf_s("%d", &move);
@nesffer
nesffer / gist:650d7fb74d9794fc452a
Last active August 29, 2015 14:21
Network Connection Popup
# -*- coding: utf-8 -*-
from time import sleep
from tkinter import messagebox
from urllib.request import urlopen
import urllib.error
def net_connection_on():
try: