資源簡(jiǎn)介
代碼片段和文件信息
#include?
#include
#include?
#include?
#include?
#include?//時(shí)間?//文件
#include?
#define?random(x)(rand()%x)
using?namespace?std;
void?thunder(int?Difint?Rowint?Columnchar?*USer)
{
int?rcalls[22][22]backstage[22][22]={0};
srand((int)time(0));
for(r=1;r<=Row;r++)??????????????????????????????????????//?生成alls(0~1)1是雷
{
for(c=1;c<=Column;c++)
{
if(random(6)<1)??{alls[r][c]=1;}?else{alls[r][c]=0;};
}
};
for(r=0;r<=Row+1;r++)????????????????????????????????//生成?backstage(正確答案)
{
for(int?c=0;c<=Column+1;c++)
{
if(alls[r][c]==1)??
{
backstage[r][c]=(int)(‘*‘);?????????????//將1變?yōu)?*??代表雷
}
else
{
for(int?i=r-1;i<=r+1;i++)?????????????//將0變?yōu)閿?shù)字?(代表周?chē)讛?shù))
for(in
評(píng)論
共有 條評(píng)論