comment

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

関連記事

no image

PHPで文字を入れ替える方法

文字を入れ替えるには、strtr を使う。 例 $string = “あいうえお” ; $string1 = “あえ”; $string2 = “かけ”; // 入れ替える echo strtr($s …

no image

tex で行列間の水平間隔を調整する方法

行列を水平方向に並べるとき、間隔を開けたいことがある。\hspace コマンドを使うことで、水平方向の間隔を指定することができる。(行列表示には amsmath パッケージを使う。) 例 \usepa …

no image

std::vector で、vector の要素を erase() で消去する

任意の要素を指定して、 養素を消去することができる。 例 #include <iostream> #include <vector> int main() { std::vector&lt …

no image

C言語で関数のアドレスを表示する方法

以下では、main 関数のアドレスを取得して表示する。 例 #include <stdio.h> int main() { printf(“main 関数のアドレスは %p\n”, main); …

no image

python3 でランダムな整数の配列を作る方法

random モジュールを使う。randint() の引数で、配列の最小値と最大値を指定できる。 例 import random random_arr = [random.randint(-2 …