汐撅撅
Jump to navigation
Jump to search
汐撅撅 is a CJK-ized C++. This is the Version J.
Version C is Z++.
Syntax
Same as C++.
Programs
I/O
Hello, world
#徴兵する<標準の入力と出力>
使う 名前空間 標準;
整数 主な機能(空虚さ)
{
出力.フォーマットあり("Hello, world!");
0 を返す;
}
Variations
A+B Problem
#徴兵する<標準のC++ライブラリ>
使う 名前空間 標準;
整数 あ、い、う;
整数 主な機能(空虚さ)
{
入力.流 >> あ >> い;
う=あ+い;
出力.流 << う;
0 を返す;
}
99 bottles of beers
#徴兵する<標準のC++ライブラリ>
#徴兵する<操作系.h>
使う 名前空間 標準;
文字列 単位 = "bottles";
整数 主な機能(空虚さ)
{
繰り返します(整数 索引=99; 索引>0; 索引--)
{
式樹 (索引)
{
場合 1:
{
単位 = "bottle";
}
既定値:
{
単位 = "bottles";
}
}
出力.フォーマットあり("%d %s of beers on the wall, \n%d %s of beers. \n", i, unit, i, unit);
出力.フォーマットあり("Take one down, pass it around, \n%d %s of beer on the wall. \n\n", i-1, unit);
睡眠(1000);
}
出力.フォーマットあり("No more bottles of beers on the wall, \nNo more bottles of beers. \n");
出力.フォーマットあり("Go to the store and buy some more,\n99 bottles of beer on the wall.");
0 を返す;
}