Basic C-- Help Desperately Needed
Hey guys, in serious need of some help with a homework assignment for my C class. I'm not asking anyone to do my homework for me, but just help me realize what I'm doing wrong, and help me figure out what I still need to do.
My assignment is here:
http://ece.arizona.edu/~ece175/assig...signment03.pdf
And here's what I have done so far--I'm working on the degrees_to_radians section, but having loads of trouble. I'm totally new to C, so I guess I'm just generally confused as to what's going on.
Code:
#include <stdio.h>
#include <math.h>
double degrees_to_radians(4 doubles
main()
{
inp = fopen ("a3_input.txt", "r");
outp = fopen ("a3_output.txt", "w");
double w;
double x;
double y;
double z;
int a;
double b;
fscanf(inp, "%lf", &w);
fscanf(inp, "%lf", &x);
fscanf(inp, "%lf", &y);
fscanf(inp, "%lf", &z);
fscanf(inp, "%d", &a);
degrees_to_radians()
{
FILE *inp;
FILE *outp;
#define pi 3.14159265
scanf(inp, "%lf", &w, &x, &y, &z);
b = (scanf(inp, "%lf", &w, &x, &y, &z))*pi/180;
printf("The radian equivalents of %f", b,y);
return(b);
}
}