Search:

Type: Posts; User: dana_h

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    1,154

    Thanks for the help. :)

    Thanks for the help. :)
  2. Replies
    8
    Views
    1,154

    I wonder ...... (functions)

    Is it possible to write a function deffinition which includeds a function as an argument ?

    for ex.

    typedef struct item item;
    struct item{
    ......... }


    item *add(item *p1, item*...
  3. Replies
    5
    Views
    1,441

    I still don't know why that way is not working ...

    I still don't know why that way is not working

    but I fixed it with an internal function instead.

    I would still like to know why this isn't working.

    *************************************...
  4. Replies
    5
    Views
    1,441

    I know ,I know int main is better but we can't...

    I know ,I know int main is better but we can't use in this course.
    so I'll have to keep void main. sorry.


    quzah,
    thanks for the MUCH better date check.


    QUOTE]
  5. Replies
    5
    Views
    1,441

    if you have a few moments.......

    I have attached a program (unfinished)
    I have a problem in the second case that I can't fix.
    I tried everything I know.
    I think the problem is it can't receive the right info even thoug it...
  6. Replies
    12
    Views
    1,324

    sorry it took me so long to reply. I don't have...

    sorry it took me so long to reply.
    I don't have a compiler at home.

    Thank u for the help, Hammer.

    I have attached my more extended program.
    I'm having a problem. it doesn't accept my 2nd...
  7. Replies
    12
    Views
    1,324

    I did the changes and it just goes crazy. I...

    I did the changes and it just goes crazy.

    I think it's best just to post the function.

    Hopfully after this I will be able to do the remaining 5 functions
    all by myself.
    (I thought the...
  8. Replies
    12
    Views
    1,324

    1. my loop now looks like this : ...

    1. my loop now looks like this : "for(;getchar()!='\n'; )".

    2. I initialised "choice" and used "while (getchar() != '\n');" after
    "scanf("%s", &date);".

    now it stoped double printing...
  9. Replies
    12
    Views
    1,324

    oops.... forgot to register before.

    oops....

    forgot to register before.
  10. Replies
    12
    Views
    1,324

    I wrote part of a bigger program and it has a few...

    I wrote part of a bigger program and it has a few problems:

    1. double prints the menu.

    2. where the user has to print y to continue it prints the Q but
    automaticaly continues.

    I don't...
  11. Replies
    12
    Views
    1,324

    int varriable print to file

    Hello,
    New problem.

    maybe it's stupid but I'm stuck.

    I want to write a long int varriable into a file, do I need to transform it to binary take the lower 8 bits and using fputc print and...
  12. Thread: functions

    by dana_h
    Replies
    17
    Views
    1,975

    You're right. I was so happy when it worked...

    You're right.
    I was so happy when it worked twice I just stopped. should have tried a few more times

    Thanks.
  13. Thread: Prime numbers

    by dana_h
    Replies
    12
    Views
    2,848

    I had to do something similar. maybe it will help...

    I had to do something similar. maybe it will help you:

    int number=1;

    while(number<=10000){
    if (number<test*2)
    {
    printf("%4d",number);
    i++; ref++; test=2;
    }
  14. Thread: functions

    by dana_h
    Replies
    17
    Views
    1,975

    Thanks. I forgot that :o

    Thanks. I forgot that :o
  15. Replies
    11
    Views
    1,743

    Wow, I'm impresed. I'm a student too and at the...

    Wow,
    I'm impresed.
    I'm a student too and at the very begining of Cprog.
    That's why I ask so many Q.

    I did make some stupid mistakes but now after much help
    I got it right, it's pretty long but...
  16. Thread: functions

    by dana_h
    Replies
    17
    Views
    1,975

    Following your advice: I changed my ints to...

    Following your advice:

    I changed my ints to floats and did a little editing.
    It works.
    I do get the answers for eg. "245.000000"
    but who cares IT WORKS.

    Thanks for the help.
    All of you.
  17. Replies
    11
    Views
    1,743

    I changed my function and it works great :D ...

    I changed my function and it works great :D


    Thanks !!! (I'm so happy)
  18. Thread: functions

    by dana_h
    Replies
    17
    Views
    1,975

    Re: RE: function

    I am new to C and have no idea what %lu means.
    We haven't learned it, therefore I can;t use it.

    Maibe if I knew what it does I could write it difrently (not %lu).
  19. Thread: functions

    by dana_h
    Replies
    17
    Views
    1,975

    If the poly was enitiated it should evaluate it...

    If the poly was enitiated it should evaluate it and if it wasn't
    since it is zero based it should return "0".

    This is part of the code which uses EVALUATE :


    /*The following program enables ...
  20. Replies
    11
    Views
    1,743

    Thaks. I'm going to try something like that....

    Thaks.

    I'm going to try something like that.
    Atleast now I know how to do it.

    I hope it will work :)
  21. Thread: functions

    by dana_h
    Replies
    17
    Views
    1,975

    I need to evaluate a polynomial for eg.: ...

    I need to evaluate a polynomial for eg.:

    2x^3+4x

    x=2

    I should be getting "24"
    what I get are completley crazy numbers "12471158" or "0"
  22. Thread: functions

    by dana_h
    Replies
    17
    Views
    1,975

    I've tried it but it doesn't work. Thanks...

    I've tried it but it doesn't work.

    Thanks anyway.
  23. Thread: functions

    by dana_h
    Replies
    17
    Views
    1,975

    functions

    Hi,
    it's me again...

    Can someone help me to find why I don't get the
    return I need?


    int EVALUATE (int poly[],int num) {
    int i,m,temp,total=0,result=1;
  24. Replies
    11
    Views
    1,743

    I have to receive anything frm the user and when...

    I have to receive anything frm the user and when I get garbage the function should stop.
    that's why I've used "scanf %s".

    It does ignore the garbage but it doesn;t stop untill it receives 9 valid...
  25. Replies
    11
    Views
    1,743

    I tried it but it still doesn't work. Actually...

    I tried it but it still doesn't work.

    Actually none of the restrictions work.
    (It's really sad.)
Results 1 to 25 of 28
Page 1 of 2 1 2