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 main(int argc, char *argv[]) { | |
printf("hello world\n"); // 「hello world」を表示し, 改行を一度行う. | |
return 0; | |
} |
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
int mystrncmp(char str[], char str2[], int n) { | |
int i; | |
for (i = 0; i < n; i++) { | |
if (str[i] != str2[i]) { | |
return 1; | |
} | |
} | |
return 0; | |
} |
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 Russian (int x, int y){ | |
int m; | |
if (x % 2 != 0) { | |
m = y; | |
} else { | |
m = 0; | |
} |
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
IBOutlet NSMenuItem* item1; | |
IBOutlet NSMenuItem* item2; | |
IBOutlet NSMenuItem* item3; | |
IBOutlet NSMenuItem* item4; | |
if ([item1 state]) { // item1を選択済み | |
str3 = [str1 stringByAppendingString:str2]; | |
[textView3 setString:str3]; | |
} else if ([item2 state]) { // item2を選択済み |
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 <math.h> | |
double bekijo(char str[]) { | |
int operator, count = 0; | |
double num1, num2; | |
for (int i = 0; str[i] != '\0'; i++) { | |
if (str[i] == '+') { | |
operator = 0; |
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
<?php | |
echo($_POST['text1']); | |
?> |
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
int findInt (int a[], int n, int x){ | |
int i; | |
for (i=0; i < n; i++) { | |
if (a[i] == x) { | |
return 1; | |
} else { | |
return 0; | |
} | |
} | |
return -1; |
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> | |
struct node{ | |
char data; | |
struct node* next; | |
}; | |
/* リストの検索 */ | |
int listSearch( struct node* head, char str ){ |
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
#import <Cocoa/Cocoa.h> | |
@interface AppDelegate : NSObject <NSApplicationDelegate> | |
@property (assign) IBOutlet NSWindow *window; | |
@end |
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
int factorial(int n){ | |
if(n == 1){ | |
return 1; | |
} | |
return n * factorial(n-1); | |
} |
OlderNewer