Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~3K People Reached
Favorite Forums
Favorite Tags
c++ x 68
Member Avatar for andyg55

Hi, I'm trying to create a 2d array that will fill itself up with numbers i have in a text file. My text file looks like this: 1 5 4 2 6 3 3 9 4 4 1 8 5 2 2 So, I want to create an array with …

Member Avatar for tagazin
0
2K
Member Avatar for andyg55

Hi guys, I'm sure this is pretty simple really, but I can't get my head around it. I have a long equation that I'm using c++ to work out. It involves a random number generator, so each time the program is run, it replaces one of the variables in the …

Member Avatar for xylog
0
74
Member Avatar for andyg55

Hi guys, I have an input file as below (it is a family tree): 1 0 0 2 0 0 3 0 0 4 1 2 5 1 2 6 0 0 7 3 4 8 5 6 9 7 8 10 7 8 where column 1 = individual number …

Member Avatar for Lerner
0
164
Member Avatar for andyg55

I have an equation within a while loop like this: [code] while(repeats != 1000000){ x = rand1; y = rand2; result = x + y; cout << result; repeats++; } [/code] Basically, 2 numbers are randomly generated, and are added together to put in the variable 'result'. What the above …

Member Avatar for vijayan121
0
186
Member Avatar for andyg55

My program initially asks the user to input 3 values, x1, x2 and x3. These get fed into a mathematical equation and come out of it the other side slightly altered. The program then prints to screen the new values of x1, x2, and x3. These x values must go …

Member Avatar for John A
0
147
Member Avatar for andyg55

input file: 1 0 0 2 1 0 0 2 1 I would like to produce this in a 3x3 array on screen. My code: [code] #include <fstream.h> #include <stdlib.h> int i, j; int matrix[3][3]; int main () { ifstream inFile; inFile.open("input.txt"); if (!inFile) { printf ("Unable to open input …

Member Avatar for VernonDozier
0
171
Member Avatar for andyg55

Hi guys, I have an array which reads in a file and displays it to the screen. The output is as follows: 1 0 0 2 0 0 3 0 0 4 1 2 5 1 2 6 0 0 7 3 4 8 5 6 9 7 8 10 …

Member Avatar for VernonDozier
0
284
Member Avatar for andyg55

Hello!! I have an array filled with figures stored in an input file. My program has read the input file, and filled the array with the contents. I also have a random number generator. I have made this make 2 random numbers between 0 and 1 at a time. I …

Member Avatar for VernonDozier
0
225
Member Avatar for andyg55

I have an array that has read from file as follows: 1 0 0 2 0 0 3 1 2 4 1 2 5 3 0 For the first two lines ( the ones that end 0 0) I want to enter two additional sets of data, so an additional …

Member Avatar for VernonDozier
0
159