Code:
#include <stdio.h>
#include <math.h>
double degrees_to_radians(double, double, double, double, int)
double compute_distance(double, double, double, double, int)
num_of_digits_in_base(double, double, double, double, int)
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;
double c;
fscanf(inp, "%lf", &w);
fscanf(inp, "%lf", &x);
fscanf(inp, "%lf", &y);
fscanf(inp, "%lf", &z);
fscanf(inp, "%d", &a);
input()
{
fscanf(inp, "%lf", &w, &x, &y, &z);
printf("The four values read as input are );
}
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", &w, &x, &y, &z are /n/n");
return(b);
}
compute_distance()
{
FILE *inp;
FILE *outp;
scanf(inp, "%lf", &w, &x, &y, &z);
double x1, y1, x2, y2;
c = sqrt(((x1-x2)*(x1-x2)) + ((y1-y2)*(y1-y2)));
printf("The distance between %lf (&w, &x) and (&y, &z) is"
return(c)
}
num_of_digits_in_base()
{
printf("The number of digits required to represent <a> in base 2, 4, 8,
10 are <scanf()>;
printf("The smallest integer greater than or equal to <x> is <scanf()>;
printf("The largest integer smaller than or equal to <y> is <scanf()>;
}
}
Any help is appreciated!