Thanks for your help laserlight and Sebastiani i should be able to figure the rest out.
My Professor wants the program to be written in C. Why C instead of C++ i don't know. But its part of a...
Type: Posts; User: rhouli67
Thanks for your help laserlight and Sebastiani i should be able to figure the rest out.
My Professor wants the program to be written in C. Why C instead of C++ i don't know. But its part of a...
Seeing I'm not familiar with malloc() I have two questions. Ill try to explain them as best as possible although it will be hard.
#include <stdio.h>
#include <math.h>
#define SIGMA 0.5
...
I'm working with a professor on research at the college i attend. My job currently is to convert his code from matlab to C. My problem is i have an array called:
double gp[ x] [ 4 ];
The thing...
Figured it out.... sorry!!
You were right.. i opened powsqrt5.c and there was nothing in the file. I re-wrote the program in the file and added -lm to the end when i complied and it complied and ran just fine. Thanks for the...
Thanks for trying atleast!
Hmmm. Im pretty sure your right about the comlier not reading in math.h though seeing cbrt(); gives me the same problem;
/* This program finds the cube root of 2*/
#include <stdio.h>...
The last thing i have on my command line is "-lm" in both attempts... so yes i did it just gives me the error back that i showed in the post above. And the book Im using to teach me C uses return...
gambit:~>gcc -o powsqrt5 powsqrt5.c -lm
gcc: powsqrt5.c: No such file or directory
gambit:~>gcc -o powsqrt5.exe powsqrt5.c -lm
gcc: powsqrt5.c: No such file or directory
I tried and thats...
Another example;
/* Goal of this problem is to find out if sqrt of 5 is the same as 5^1/2*/
#include <stdio.h>
#include <math.h>
int main()
{
This program is supposed to output the Power of 2's Table:
#include <stdio.h>
#include <math.h>
int main()
{
double two;
int exponenet;
Thanks for the advice. Ill be sure to change that.
Your completely right. Our lab assignment was to write the program normally and get it to function properly. Then we had to re-write it with functions. So when we ran it i accidentally ran the first...
Got it to work!! Thanks for the help
#include <stdio.h>
/* Function Prototypes */
int getScore();
char convertGrade(int numScore);
Changed it around a little cause it wouldnt complie and it still wont:
wolverine:~>gcc gradelab2.c
/tmp/ccIa6DPd.o: In function `main':
gradelab2.c:(.text+0x1d): undefined reference to...
ConvertGrade is returning char letterGrade to be used in the showGrade function.
I did this with everything else the same:
wolverine:~>gcc gradelab.c
gradelab.c: In function 'getScore':
gradelab.c:30: error: 'numScore' undeclared (first use in this function)
gradelab.c:30:...
Im assuming you mean convertGrade(getScore());
and i did and tried to complie and....:
wolverine:~>gcc gradelab.c
/tmp/ccM4cwjx.o: In function `main':
gradelab.c:(.text+0x1a): undefined...
wolverine:~>a.out
-1078499092 is not a vaild number. Please enter a number between 0 and 100
wolverine:~>a.out
-1080232116 is not a vaild number. Please enter a number between 0 and 100...
Hi im a freshman college student in C programming. We are learning how to use functions. For some reason no one in my Lab can get it to work and im the closest. Here is my code:
/*
Ryan...