This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> // srand(), rand() | |
#include <time.h> // time() | |
int main() | |
{ | |
int random; | |
// rand 함수로 난수를 만들고 3으로 나눈 나머지로 0, 1, 2만 나오도록 한다. | |
srand((unsigned)time(NULL)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class DayofYear | |
{ | |
private: | |
int d_mon; | |
int d_day; | |
int t_mon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#define ASCII 128 | |
// base를 밑으로 하는 x의 로그 | |
double logB(double x, double base) | |
{ | |
return log(x) / log(base); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define BUFFER 128 | |
// Bayer pattern | |
char BAYER[2][2] = { | |
{'G', 'B'}, | |
{'R', 'G'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
// 함수 선언 | |
int addition(int,int); | |
int subtraction(int,int); | |
int multiply(int,int); | |
double divide(int,int); | |
// main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int fibonacci(int); | |
int main() | |
{ | |
int i, n; | |
printf("n: "); | |
scanf("%d", &n); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.catchabug.AndroidFirst; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
public class AndroidFirst extends Activity { | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
TextView MyText = new TextView(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.catchabug.TextViewTest; | |
import android.app.Activity; | |
import android.os.Bundle; | |
public class TextViewTest extends Activity { | |
/** Called when the activity is first created. */ | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
> | |
<ImageView | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:src="@drawable/pride" |
OlderNewer