天梯赛题号L1-002打印沙漏(C++)
发布时间
阅读量:
阅读量
#include <iostream>
#include <cmath>
//We will use sqrt function.
//原理:输入数字和符号;经过计算后,给出多余数字和最外层字符显示数;利用最外层字符显示数逐行输出,显示多余数字。
//The core princple: First, we import the number and the character; and after calculating, we can get
//the redundance value (acronym: RedunVal) and the number of characters of the first row
//(acronym: FirRowCharNum); Finally, we utilize FirRowCharNum to display characters row by row and RedunVal.
//输入函数 The input function of two data
void input2(int& num, char& ch) {
std::cin >> num;
std::cin >> ch;
全部评论 (0)
还没有任何评论哟~
