This file contains hidden or 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
| first = '衣笠丼' | |
| second = 'ぬか漬け' | |
| third = '寿司' | |
| puts first | |
| puts second | |
| puts third | |
| animals = ['猫', '犬', '猿'] |
This file contains hidden or 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
| person = { | |
| 'name' => '@tomcha_', | |
| 'hobby' => 'programming', | |
| 'food' => '衣笠丼' | |
| } | |
| puts person['name'] | |
| puts person['hobby'] | |
| puts person['food'] |
This file contains hidden or 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
| print "あなたの名前は? >>>" | |
| name = gets | |
| name.chomp! | |
| puts "あなたは#{name}さんですね。" |
This file contains hidden or 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> | |
| #define MAXLINE 1000 | |
| int main(){ | |
| int c; | |
| int i,j; | |
| char line[MAXLINE]; | |
| i = 0; | |
| while((c = getchar()) != EOF){ | |
| line[i] = c; |
This file contains hidden or 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> | |
| #define MAXCHAR 100 | |
| void delblank(char line[], char newline[]); | |
| void cleararray(char array[]); | |
| int main(){ | |
| int c; | |
| int i; | |
| char line[MAXCHAR]; |
This file contains hidden or 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> | |
| #define MAXCHAR 100 | |
| void reversd(int i, char s[], char r[]); | |
| void cleararray(char array[]); | |
| int main(){ | |
| char s[MAXCHAR]; | |
| char r[MAXCHAR]; | |
| int c; |
This file contains hidden or 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> | |
| #define MAXCHAR 100 | |
| #define TABSTOP 5 | |
| int detab(char strings[], int clocate, int n); | |
| void cleararray(char array[]); | |
| int main(){ | |
| char strings[MAXCHAR]; | |
| int c; |
This file contains hidden or 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> | |
| #define MAXCHAR 100 | |
| #define TABSTOP 6 | |
| void entab(); | |
| int main(){ | |
| int c; | |
| char str[MAXCHAR]; | |
| int i, j; |
This file contains hidden or 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> | |
| #define N 10 | |
| #define MAXSTRINGS 100 | |
| int ggetline(char str[]); | |
| void cleararray(char str[], int n); | |
| int main(){ | |
| char str[MAXSTRINGS]; | |
| char newstr[MAXSTRINGS]; |
This file contains hidden or 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> | |
| #define MAXSTRINGS 1000 | |
| // | |
| //ファイル操作はまだ学習してないので、Cのソースをcatとパイプで受け取る前提 | |
| int main(){ | |
| int c; | |
| int i = 0; | |
| int j; | |
| int qflg; // '-> 1, "-> 2 | |
| int eflg; // normal ->0, // -> 1, /* -> 2 |