sl201.cpp
来自「Visual C++ 的学习资料一」· C++ 代码 · 共 21 行
CPP
21 行
// sl201.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostream.h"
int main()
{
char str[10];
cout<<"输入少于9个字符"<<'\n';
cout<<"str=";
cin >>str;
cout<<"直接输出字符串"<<'\n';
cout<<str<<'\n';
cout<<"通过数组元素输出字符串"<<'\n';
for(int i=0;i<10;i++)
{
cout<<str[i];
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?