Sorry about that! I tried to make the formatting clearer and did the opposite of what I intended to, I guess! The formatting should be okay now. Thanks.
Type: Posts; User: sam...
Sorry about that! I tried to make the formatting clearer and did the opposite of what I intended to, I guess! The formatting should be okay now. Thanks.
Hi! These are the instructions:
Write a program which calculates the integral of the function
f(x)=A*exp(-x^2)+(B*x^n)/m!
on the interval from a to b (0<a<b). In the...
When I put (0), I got:
error: macro "getchar" passed 1 arguments, but takes just 0
So I left it blank: getchar()
I don't know if that's right but it compiled and I got in the assignment...
Thanks so much! That clarifies a lot. :)
So I wrote the program and it compiled but it wouldn't run for some reason.
Then I realized that I needed to edit this:
printf("Enter a character...
Thank you!!
Is there any specific way to use getchar() ?
Is that kind of like scanf?
Hi! I have written a part of the program but don't know if I'm going in the right direction. I was also wondering how to use getchar() because I've never used that before. I'm quite a novice at this...
When I try to compile this, I get a warning:
void
poly_diff(int *d, double **p) {
/*
* poly_diff(int *d, double **p)
* differentiates the polynomial (d, p)
It's a file (libpoly.a) that was provided by him that I was instructed to copy into my own directory.
Here are his statements regarding this:
To compile my program (final.c) with libpoly.a,...
Thank you!! That makes this so much more clear!
I was wondering: what is the command to open a library file?
Our instructor provided us with access to one (for the functions) but i don't know how...
Thank you so much!
I think this should work. :)
What is free(p)?
I've never used it before..
Help please! I'm writing the main part of a program that utilizes several functions (in various files); I think I've got the functions (like poly.c that's mentioned here) but I'm confused about this....
Just because I asked at the last minute doesn't mean I didn't have work done beforehand.
I was simply asking for suggestions and clarifications; I didn't want to post my work online because of the...
Thank you so much! I figured out how to write the 3 functions...now I'm just having trouble with the main() part. Please let me know if you have any suggestions; meanwhile, I'll keep working on it.
...
I'm not asking anyone to do my work for me...I just need some guidance.
I prefer to do my own work anyway.
I just don't understand what mat_vec_mult even is...and how it would perform the product...
Thank you. So I don't need the "void" part?
But the prompt says that the prototype of the function called mat_vec_mult has to look like:
void
mat_vec_mult(double A[], int m, int n,
...
I have to write a C program for a class; due at 9 pm tonight.
I have absolutely no idea how to get started on this.
I've worked with arrays and matrices to some degree but I don't have much...
Thank you all so much!!
I finally compiled the program and submitted it. :)
I was wondering...
You haven't used "fprintf" or "fgets". Will it still work?
Sorry about that. I was confused because I didn't really understand argc and argv at the time.
I think it makes more sense now.
I'll work on it some more. Thank you!
Adak, thank you for your...
It is definitely starting to make more sense and the examples help.
Thank you both so much!!
I think I understand argc but I'm still a bit confused about argv.
Also, how would I get the program...
I know about them but I don't fully know how to use them.
I believe I have to use "cat" as well....this would help me combine the files, right?
Here's what I have now:
#include<stdio.h>...
I'm not really sure what this is asking me to do. Please help!
DUE at 9pm and I have no clue what to do.
I'll keep working on what I have though..
(see at end of post)
In this quiz you will...
By the way, this is what i have so far. I don't know how correct it is. I'm a newbie at this!:
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<time.h>
int main()
{
...
PLEASE HELP!!
Here's what I have to do:
In this program, you will compute a two-dimensional integral by using a
simplistic version of the Monte Carlo Method. This method relies on
random...