算数运算符
算数运算符功能列表
算数运算符 |
说明 |
算术运算符 |
说明 |
+ |
加法运算符 |
/ |
除法运算符 |
- |
减法运算符 |
% |
求模运算符 |
* |
乘法运算符 |
#include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int result = 1; int i = 0; int count = 0; char Text[128]; char cryptograph[128]; while (1) { if (result == 1) { printf ("请输入要加密的明文: "); scanf_s ("%s",&Text,128); count = strlen(Text); for (i = 0; i < count; i++) { cryptograph[i] = Text[i] + i + 5; } cryptograph[i] = '