- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 3
- Posts with Downvotes
- 1
- Downvoting Members
- 3
[CODE]#include <stdio.h> #include <string.h> int main() { int count = 0; char *doc; FILE *inp; printf("Enter the file name: "); scanf("%s", doc); inp=fopen(doc, "r"); while((doc = fgetc(doc)) != EOF) { if (doc == ' ') count++; } fclose(doc); printf("%s contains %d words\n",doc,count); return 0; } [/CODE] So basically I'm a … |
|
I'm really confused as to how to set up this program. The program is to have a function "trap", so I'm guessing that means I have to include a function that solves the integral before my main function? [CODE] #include <stdio.h> #include <math.h> double f(double x) { return exp(-x*x); } … |
|
Ok so, I'm working on a program that is suppose to solve a function: (1+ (x^2) / sqrt(3x+6)) / (x^2 - 5x) As you tell by the function the denominator cannot be = to 0. So here's my code that I'm having trouble with. [CODE] #include <stdio.h> #include <math.h> int … |
|
Hey guys, I'm having a little trouble putting this together. I believe I have the formula correct on the bottom, but I can't seem get the program to work. The idea is that it needs to be able to run like this: ./sdev < input.file I have a simple understanding … |
|
New here, came across this board through google. A short introduction of who I am. I've spent years looking at it and now I'm towards the end of my college run taking some programing classes before I graduate. I'm an applied mathematics major, and programing has been an interest but … |