Add xeinit6

This commit is contained in:
daleclack 2020-11-17 22:50:39 +08:00
parent bceee4a353
commit 9a5c04c353
1 changed files with 27 additions and 0 deletions

27
cpp/xeinit6.cpp Normal file
View File

@ -0,0 +1,27 @@
#include <iostream>
#include <cstdio>
#include <cstring>
int main(int argc,char *argv[])
{
int a,num1,result1;
if(argc<2){
std::cout<<"usage:"<<argv[0]<<" [circulate number]"<<std::endl;
}else{
/*std::cout<<"argc="<<argc<<std::endl;
for(int i=0;i<argc;i++){
std::cout<<"argv["<<i<<"]="<<argv[i]<<std::endl;
}
a=strlen(argv[1]);
for(int i=0;i<a;i++){
std::cout<<*argv[1]<<std::endl;
}*/
a=atoi(argv[1]);
for(int i=0;i<a;i++){
num1=rand();
}
result1=num1%2;
std::cout<<result1<<" "<<num1<<std::endl;
}
return 0;
}