📄 ifelse.cpp
字号:
// ifelse.cpp -- using the if else statement
#include <iostream>
int main()
{
using namespace std;
char ch;
cout << "Type, and I shall repeat.\n";
cin.get(ch);
while (ch != '.')
{
if (ch == '\n')
cout << ch; // done if newline
else
cout << ++ch; // done otherwise
cin.get(ch);
}
// try ch + 1 instead of ++ch for interesting effect
cout << "\nPlease excuse the slight confusion.\n";
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -