实时版:http://cpp.sh/953y6
代码:
#include <iostream>
#include <cstdio>
using namespace std;
int main() {
// Complete the code.
int num1 = 8, num2 = 11;
for(int n = num1; n <= num2; n++){
if(n <= 9){
switch(n){
case 1: cout << "one\n";
case 2: cout << "two\n";
case 3: cout << "three\n";
case 4: cout << "four\n";
case 5: cout << "five\n";
case 6: cout << "six\n";
case 7: cout << "seven\n";
case 8: cout << "eight\n";
case 9: …Run Code Online (Sandbox Code Playgroud) 我有一个包含这一行的程序:
int xoredValue = (x ^ 0x41);
Run Code Online (Sandbox Code Playgroud)
其中x是一个int,我用它和十六进制代码的二进制形式进行编码.0x41用于表示ascii字母.而不是使用0x41,我想成功
char a = 'a';
int xoredValue = (x ^ <hex of a>);
Run Code Online (Sandbox Code Playgroud)
我一直想弄清楚它有多久,它正在煎我的面条.有帮助吗?