测试在csdn博客中插入代码
来源:互联网 发布:网络的利与弊议论文 编辑:程序博客网 时间:2024/06/02 19:18
测试插入代码
测试1:直接复制粘贴文本的方式
#include<iostream>
#include<string>
int main()
{
std::cout << "please enter your first name:";
std::string name;
std::cin >> name;
const std :: string greeting = "hello,"+ name + "!";
const std :: string spaces(greeting.size(),' ');
const std :: string second ="*" + spaces + "*";
const std :: string first (second.size(),'*');
std :: cout <<std ::endl;
std :: cout <<std::endl;
std :: cout <<first<<std::endl;
std :: cout <<second<<std::endl;
std :: cout <<"*"<<greeting<<"*"<<std ::endl;
std :: cout <<second<<std :: endl;
std :: cout <<first<<std::endl;
return 0;
}
测试2:插入代码的方式,注意选择编程语言
#include<iostream> #include<string>int main(){std::cout << "please enter your first name:";std::string name;std::cin >> name;const std :: string greeting = "hello,"+ name + "!";const std :: string spaces(greeting.size(),' ');const std :: string second ="*" + spaces + "*";const std :: string first (second.size(),'*');std :: cout <<std ::endl;std :: cout <<std::endl;std :: cout <<first<<std::endl;std :: cout <<second<<std::endl;std :: cout <<"*"<<greeting<<"*"<<std ::endl;std :: cout <<second<<std :: endl;std :: cout <<first<<std::endl;return 0; }
测试3:引用代码片的方式
#include#include int main(){std::cout << "please enter your first name:";std::string name;std::cin >> name;const std :: string greeting = "hello,"+ name + "!";const std :: string spaces(greeting.size(),' ');const std :: string second ="*" + spaces + "*";const std :: string first (second.size(),'*');std :: cout <
分别使用三种方式插入代码片,具体何种方式最有效,得看博客审核通过后的实际情况了……
阅读全文
0 0
- 测试在csdn博客中插入代码
- 测试一下在CSDN博客中插入代码
- CSDN博客插入代码测试
- 如何在CSDN博客中插入图片
- 在CSDN博客中插入图片
- 如何在CSDN博客中插入图片
- 如何在csdn中插入代码
- 在csdn博客中写一篇博客测试一下
- 手把手教大家如何在CSDN博客中插入图片
- csdn怎么在博客中插入图片上传图片呢
- 关于在CSDN中写博客时如何插入图片
- 如何在CSDN博客中插入动态图(GIF)
- 在CSDN博客中插入公式和图片
- 如何在csdn博客中插入视频或gif
- CSDN如何在博客中插入图片详解
- 测试如何在博客中加入代码
- csdn博客中插入公式
- csdn博客中插入公式
- 在windows下使用Cygwin模拟unix环境,并安装apt-cyg,repo等工具
- TP5学习基础一:增删改查小demo
- ANGULARjS自定义计时器
- Java方法的创建和重载
- Android 复制文本内容到系统剪贴板
- 测试在csdn博客中插入代码
- sourceInsight4 破解方法
- 有效回文串
- TP5学习基础二:目录结构、URL路由、数据操作
- 初识createJS
- tcpdump入门介绍
- Retrofit2-如何在请求时使用动态URL
- Hadoop2.7.2之集群搭建(三台)
- 通过例子学设计模式之--适配器模式以及使用场景说明(C++实现)