フォロー

<stdio.h>
<stdlib.h>

int main(void){
char namae[] = {"本田一太太郎"};
char a, b, c;

if(rand() % 2 == 0)
{
a = namae[0];
}
else
{
a = namae[1];
}

if(rand() % 2 == 0)
{
b = namae[2];
}
else
{
b = namae[3];
}

if(rand() % 2 == 0)
{
c = namae[4];
}
else
{
c = namae[5];
}

printf("山%c%c%c", a, b, c);

return 0;
}

秒で書いた。コンパイルすらしてないしタイポも知らんw

· · SubwayTooter · 0 · 0 · 2
ログインして会話に参加
グルドン

Mastodon は、オープンなウェブプロトコルを採用した、自由でオープンソースなソーシャルネットワークです。電子メールのような分散型の仕組みを採っています。