![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
#
??{?+?}
这个作者很懒,什么都没留下…
展开
-
要求输入一个值,指出显示多少行。然后程序将显示星号,在星号不够时,将显示句点。
#include int main() { using namespace std; int count=0; cout << "Enter star's number:\n"; cin >> count; for (int i = 1; i <=count; ++i) //最好设置为1 { for (int j = 1; j <= count - i; j++) { cout << '.'; } for (int j = 1; j <=原创 2020-09-19 22:09:10 · 99 阅读 · 0 评论 -
Bresenham画线算法简单实线
#include<freeglut.h> #include<cmath> typedef GLint Vertex3[3]; GLint winwidth = 300, winheight = 300; void reshapeFcn(GLint newwidth,GLint newheight) { glViewport(0, 0, newwidth, newheig...原创 2020-04-12 18:00:28 · 184 阅读 · 0 评论 -
#编写一个要求用户输入数字的程序。每次输入后,程序都将报告到目前为止,所有输入的累计和。当用户输入0时,程序结束。
#include <iostream> using namespace std; const int Size = 20; void main() { int arr[Size] = { 0 }; int ch,zong=0; int i = 0; cout << "enter a num:\n"; cin>>ch; while (ch != 0...原创 2020-02-27 22:00:59 · 1892 阅读 · 1 评论 -
#单利,复利。Daphne,Cleo。
#include <iostream> using namespace std; void main() { double z1=100, z2=100,z3=100; int year=0; while (z3<=z1) { year++; z1 = 100 + 10 * year; z3 = z2*1.05; z2 = z2*1.05; } c...原创 2020-02-27 22:30:27 · 114 阅读 · 0 评论