CodemaoC++
Jump to navigation
Jump to search
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
CodemaoC++ is C++ based language that IS TEXTUAL, NOT VISIBLE.
Syntax
You may use 当 开始 被点击 to represent int main(){}.
Programs
I/O
Hello, world
准备
引入位于 std 库的 iostream
当 开始 被点击
输出流<<["Hello, world!"]<<[换行符]
返回 0
Variations
A+B
准备
引入位于 std 库的bits/stdc++.h
数据
定义 A、B、C 为整型
当 开始 被点击
输入流>>[A]>>[B]
设置C为[A+B]
输出流<<[C]
返回 0
Algorithm
Bubble sort
准备
引入位于 std 库的 bits/stdc++.h
数据
定义 array[None] = {}
定义函数 空类型 冒泡排序(整型数组 array, 整型 length)
重复执行(定义 i = 1 至 length, 步长为1)
重复执行(定义 j = 0 至 length-i-1, 步长为1)
如果 array[j] > array[j+1] 那么
交换(array[j], array[j+1])
重复执行(定义 i = 0 至 length-1, 步长为1)
格式化输出("%d ", array[i])
当 开始 被点击
定义 n = 无初始值
输入流>>[n]
重复执行(定义 i = 0 至 n-1, 步长为1)
输入流>>[array[i]]
冒泡排序(array, n)
返回 0