Search:

Type: Posts; User: rhouli67

Search: Search took 0.01 seconds.

  1. Thread: Array Size

    by rhouli67
    Replies
    10
    Views
    1,427

    Thanks for your help laserlight and Sebastiani i...

    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...
  2. Thread: Array Size

    by rhouli67
    Replies
    10
    Views
    1,427

    Seeing I'm not familiar with malloc() I have two...

    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
    ...
  3. Thread: Array Size

    by rhouli67
    Replies
    10
    Views
    1,427

    Array Size

    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...
  4. Thread: Structers

    by rhouli67
    Replies
    1
    Views
    3,171

    Structers

    Figured it out.... sorry!!
  5. Replies
    14
    Views
    5,082

    You were right.. i opened powsqrt5.c and there...

    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...
  6. Replies
    14
    Views
    5,082

    Thanks for trying atleast!

    Thanks for trying atleast!
  7. Replies
    14
    Views
    5,082

    Hmmm. Im pretty sure your right about the comlier...

    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>...
  8. Replies
    14
    Views
    5,082

    The last thing i have on my command line is "-lm"...

    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...
  9. Replies
    14
    Views
    5,082

    gambit:~>gcc -o powsqrt5 powsqrt5.c -lm gcc:...

    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...
  10. Replies
    14
    Views
    5,082

    Another example; /* Goal of this problem is...

    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()
    {
  11. Replies
    14
    Views
    5,082

    pow(x, y); problems

    This program is supposed to output the Power of 2's Table:


    #include <stdio.h>
    #include <math.h>

    int main()
    {
    double two;
    int exponenet;
  12. Replies
    20
    Views
    2,285

    Thanks for the advice. Ill be sure to change that.

    Thanks for the advice. Ill be sure to change that.
  13. Replies
    20
    Views
    2,285

    Your completely right. Our lab assignment was to...

    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...
  14. Replies
    20
    Views
    2,285

    Got it to work!! Thanks for the help ...

    Got it to work!! Thanks for the help



    #include <stdio.h>

    /* Function Prototypes */

    int getScore();
    char convertGrade(int numScore);
  15. Replies
    20
    Views
    2,285

    Changed it around a little cause it wouldnt...

    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...
  16. Replies
    20
    Views
    2,285

    ConvertGrade is returning char letterGrade to be...

    ConvertGrade is returning char letterGrade to be used in the showGrade function.
  17. Replies
    20
    Views
    2,285

    I did this with everything else the same: ...

    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:...
  18. Replies
    20
    Views
    2,285

    Im assuming you mean convertGrade(getScore()); ...

    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...
  19. Replies
    20
    Views
    2,285

    wolverine:~>a.out -1078499092 is not a vaild...

    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...
  20. Replies
    20
    Views
    2,285

    Function Problem

    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...
Results 1 to 20 of 20