ok actually its 2 questions...
first..
how do i get a program to fill an array with a certain number imputed by the user?
second..
how can i make a program divide the numbers in 1 array with the numbers in another?
thanks for the help
ok actually its 2 questions...
first..
how do i get a program to fill an array with a certain number imputed by the user?
second..
how can i make a program divide the numbers in 1 array with the numbers in another?
thanks for the help
Hooked On Phonics Didn't Work For Me!
1)
-Get input from the user any way you like. getch() or whatever.
-Then just use a for loop.
2)Code:for (int i = 0; i < MAX_ARRAY_ELEMENTS; i ++) array[i] = input_from_user;
Simular to the first.
Code:for (int i = 0; i < MAX_ARRAY_ELEMENTS; i ++) { if (array2[i] != 0) //we dont want division by zero Result[i] = array1[i] / array2[i]; else Result[i] = 0; }
"There's always another way"
-lightatdawn (lightatdawn.cprogramming.com)