#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
const std::string GetGongziHorse(std::vector<std::string>& horse)
{
int size = horse.size()
int choose = rand()%size
std::string horseChoosed = horse[choose]
std::vector<std::string>::iterator it
= find(horse.begin(), horse.end(), horseChoosed)
horse.erase(it)
return horseChoosed
}
const std::string GetTianjiHorse(const std::string& horseChoosed)
{
if (strcmp(horseChoosed.c_str(), "千里马") == 0)
return "劣马"
else if (strcmp(horseChoosed.c_str(), "好马") == 0)
return "千里马"
else
return "好马"
}
int main(void)
{
srand(time(NULL))
std::string strHorse[] = {"千里马", "好马", "劣马"}
std::vector<std::string> horseGongzi
horseGongzi.insert(horseGongzi.end(), strHorse, strHorse + 3)
int i = 1
while(horseGongzi.size())
{
std::string horseChoosed = GetGongziHorse(horseGongzi)
std::cout << "第" << i << "场" << std::endl
std::cout << "虚空公子派出了:" << horseChoosed << std::endl
std::cout << "田忌派出了:"
<< GetTianjiHorse(horseChoosed) << std::endl
i++
std::cout << std::endl
}
std::cout << "田忌无耻的赢了" << std::endl
getchar()
return 0
}
原因是电瓶与车子接触不良,导致熔断丝管烧坏、电池触点或插头接触不良、电池线虚焊断路等。建议及时检查汽车的电路情况。电瓶使用的时间太长容易导致电瓶老化,电池电压不足以启动启动机就无法启动引擎欢迎分享,转载请注明来源:内存溢出
评论列表(0条)