ok so I'm writing a program that will read a data file with 30 integers in it into an array, then pass the array to a function that counts the number of positive numbers, zero's, and negative...
Type: Posts; User: Mahdi123
ok so I'm writing a program that will read a data file with 30 integers in it into an array, then pass the array to a function that counts the number of positive numbers, zero's, and negative...
I have a data file filled with random numbers, I need to read the numbers into an array and count the numbers read. Maybe Im just being an idiot right now, but for some reason I can't think of how...
ahhh ok thanks, I knew it would be something stupid like that I would forget.
Also, gets() is just what they told me to use in class, but I shall promptly inform myself otherwise.
I'm writing a program to read in user intered values for a country (read into a 2D character array) and 2 different types of values (into a 2D float array) and calculate a third value. I wrote out...
haha, looks like that was the problem - I could've sworn I already had that ampersand there, if I had noticed it I would've fixed that myself. Anyways its working for what I have now, thanks for the...
Alright, I did what Salem suggested and also tried changing the function read2D() to a void function; however, both ways still give me the "process died on signal 11" error.
Ok so I rewrote everything thusly:
#include <stdio.h>
#define nRows 8
#define nCols 7
#define FILENAME "assign8in.txt"
int read2D(int array[][nCols], int numRows, int numCols);
I'm working on an assignment and ran into some problems about halfway through my code, so I decided to start over going a little slower now. However now I've written the first two functions and they...
alright gotcha, its working now, thanks for the help
I changed this
void belowaverage(int array[nRows][nCols], int numRows, int numCols)
{
float average=0;
int i, j, sum=0;
mean(array, numRows, numCols);
I'm writing the code for my newest class assignment and I've been writing it in pieces to try and work out bugs along the way, so far the only problem I have is that the file I am reading from is...