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
person = { | |
'name' => '@tomcha_', | |
'hobby' => 'programming', | |
'food' => '衣笠丼' | |
} | |
puts person['name'] | |
puts person['hobby'] | |
puts person['food'] |
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
print "あなたの名前は? >>>" | |
name = gets | |
name.chomp! | |
puts "あなたは#{name}さんですね。" |
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> | |
#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 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 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 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 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 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 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 |
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> | |
#define MAXSTRINGS 10000 | |
// 1-23に同じく、catとパイプでソースを受け取る | |
int main(){ | |
int c; | |
char str[MAXSTRINGS]; | |
int i = 0, j; | |
int n = 1; | |
int qflg =0; // normal -> 0, sq -> 1, dq -> 2 | |
int eflg = 0; // normal -> 0, // -> 1, /* -> 2 |