Skip to content

Instantly share code, notes, and snippets.

View Jack2's full-sized avatar

JAEKI KIM Jack2

View GitHub Profile
@Jack2
Jack2 / long_ex.cpp
Created November 1, 2012 05:57
[C++]long_example
#include <iostream>
using namespace std;
int main()
{
long soo;
soo = 2147483647;
cout << soo << endl;
return 0;
}
@Jack2
Jack2 / p103_ex.cpp
Created November 2, 2012 02:23
[C++]page103_example
#include <iostream>
using namespace std;
struct Dancer {
char name[50];
int age;
};
void PrintPersonRef(const Dancer &dcr)
@Jack2
Jack2 / p98.cpp
Created November 2, 2012 02:38
[C++]page98_example
#include <iostream>
using namespace std;
int main()
{
int num;
int &new_num = num;
new_num = 31337;
@Jack2
Jack2 / stu_score.cpp
Created November 2, 2012 08:39
[C++]student_score_admin
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
using namespace std;
class Student {
public :
void SetID(int num) { id = num; }
@Jack2
Jack2 / calc.cpp
Created November 3, 2012 07:38
[C++]hw4_CUI_calc_2012/11/03
#include <iostream>
using namespace std;
class Kkupdaeki
{
public:
void DrawTriangle();
};
@Jack2
Jack2 / SCBD_ex.cpp
Created November 6, 2012 15:01
[C++]switch/case/break/default_example
#include <iostream>
using namespace std;
int main()
{
cout << "Press Any Number" << endl;
int input;
cout << "My Number : ";
cin >> input;
@Jack2
Jack2 / calc.cpp
Created November 6, 2012 15:58
[C++]hw4_CUI_calc_2012/11/07
#include <iostream>
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
using namespace std;
int getch(void)
{
int ch;
@Jack2
Jack2 / do_while_ex.cpp
Created November 7, 2012 15:16
[C++]do_while_example
#include <iostream>
using namespace std;
int main(){
int soo;
do{
cout << "If you want to exit then you press 1 : " ;
cin >> soo;
} while(soo != 1);
@Jack2
Jack2 / class_ex.cpp
Created November 9, 2012 17:44
[C++]class_example
#include <iostream>
using namespace std;
class superstar
{
public:
char skill;
int passion;
int communication;
@Jack2
Jack2 / float.cpp
Created November 10, 2012 02:54
[C++]float_example (+cin.getline)
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char buffer[100];
float price;
int quantity;