Bogdan will be disappointed to see this :P
Type: Posts; User: z0diark
Bogdan will be disappointed to see this :P
Ok I'll try it out with a smaller input file, does anyone else see anything wrong with my code?
Yes, I know it's going to loop 10000 times if b is pi/2. There are 10000 rows in my .dat file for x and fx as x increases from 0 to pi/2. Also, since there are 10000 rows and 2 collumns (20000...
I think he was being sarcastic :/
OK, but at the start I said that b must be smaller than pi/2. If you look at that surely b cannot exceed ns? Also, I tried swapping the code around so i have (i < ns) and got a segmentation fault,...
In response to points 1 and 2, is leaving them as they are going to be detrimental to the function of my program (I'd rather make it look neat afterwards if it isn't going to break my program).
3 -...
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char* argv [])
{
FILE *input;
double valid1, valid_input, b, tmp, *x, *fx, *dx, area, total_area;...
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
FILE *input;
float v1[3], v2[3], v3[3];
const char inp_fn[]="matrix.dat";
input = fopen(inp_fn,...
I've been given an assignment to calculate the determinant of a 3x3 matrix which I must read from a .dat file. The contents of the .dat file should look something like this:
1 3 2
2 3 3
1 2 2
...