opdb/c/test.cpp

24 lines
427 B
C++

//#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
int main(){
int arr[] = {1,2,3};
printf(" 对面的女孩看过来!\n");
string s = "1234";
string s2 = "q";
int a = s[0]-'0';
int b = s[1]-'0';
int c = s[2]-'0';
int d = s[3]-'0';
int e = s2[4]-'0';
printf(" %d-%d-%d-%d\n",a,b,c,d);
printf(" %d\n",e);
printf(" %d\n",arr[d]);
return 0;
}