#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <cgicc/CgiDefs.h>
#include <cgicc/Cgicc.h>
#include <cgicc/HTTPHTMLHeader.h>
#include <cgicc/HTMLClasses.h>
using namespace std;
using namespace cgicc;
int main ()
{
Cgicc formData;
cout << "Content-type:text/html;charset=utf-8\n\n";
// 告诉浏览器字符编码
cout << "<html>\n";
cout << "<head>\n";
cout << "<title> C++ web 编程</title>\n";
cout << "</head>\n";
cout << "<body>\n";
int space, rows;
cout <<"打印三角形: <br/>";
// cin >> rows;
rows=7;
for(int i = 1, k = 0; i <= rows; ++i, k = 0)
{
for(space = 1; space <= rows-i; ++space)
{
cout <<" ";
}
while(k != 2*i-1)
{
cout << "*";
++k;
}
cout << "<br/>";
cout << endl;
}
return 0;
}
Powered by ddoss.cn 12.0
©2015 - 2025 ddoss
渝公网安备50011302222260号
渝ICP备2024035333号
【实验平台安全承诺书】
小绿叶技术社区,优化网络中,点击查看配置信息
主机监控系统: 安全防火墙已开启检查cc攻击-下载文件完成后等待10s 恢复访问,检查连接数低于峰值恢复访问
您的IP:216.73.216.110,2025-12-01 15:20:51,Processed in 0.01682 second(s).