srand( (unsigned)time( NULL) );
int a = 0;
int b = 0;
int array;
for(int times=0;times<25;times++)
for(int a=0; a<25; a++)
{
for(int b=1; b<25; b++)
{
...
Type: Posts; User: krazykid18
srand( (unsigned)time( NULL) );
int a = 0;
int b = 0;
int array;
for(int times=0;times<25;times++)
for(int a=0; a<25; a++)
{
for(int b=1; b<25; b++)
{
...
i dont understand u,where should i put the braces,maan i jus started c++
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <time.h>
using namespace std;
const int numberofrows=25;
const int numberofcolumns=25;
int grid[25][25];
void funcrand(int&...
this runs 50 numbers how can i make it run 25 thru r0w and 25 thru col,this is killing me
srand( (unsigned)time( NULL) );
for(int times=0;times==25;times++)
int a = 0;
int b = 0;
int...
this what i got
int main ( )
{
srand( (unsigned)time( NULL) );
for (int times=0;times<25;times++)
int a;
int b;
int grid[25][25];
int random_integer;
for (int a = 0; a<25; a++){
i have it running numbers,but i cant get it to run 25 times look at what i have wuts wrong:
srand( (unsigned)time( NULL) );
for(int times=0;times==25;times++)
int a = 1;
int b = 2;
...
doesnt it have to be random and its output is suppose to be in rows and columns and run 25 times
this is what i got i am still confused:
int main ()
{
srand(time(NULL));
int a = rand();
int row,col;
funcrand(row,col);
for (int i= 0 ; i< 25 ; i++ )
row= rand();
thank u,but this doesnt help me pass it thru columns and rows
THANk U,and how long did it take u to understand this
i dont have anything in the main(),i am so stumped i jus need a kick in the right direction
i am new i have two questions about functions
1.I need to know how to test my program with a loop of 25 repetitions
2. generate an attack location with rand() function. and pass the variable...