Search:

Type: Posts; User: beginner1

Search: Search took 0.01 seconds.

  1. Replies
    22
    Views
    2,325

    good point..ive changed it but i still get en...

    good point..ive changed it
    but i still get en error that says number of argumetns does not match prototype
  2. Replies
    22
    Views
    2,325

    thanks for the help ! i managed to figure out my...

    thanks for the help ! i managed to figure out my problem..i started getting confused with my variables i and n and mixed everything up.
    so my question relates to 2d arrays. how do i declare one of...
  3. Replies
    22
    Views
    2,325

    double function(double, double, double); double...

    double function(double, double, double);
    double aa[N]=a;
    double ab[N]=b;
    double ac[N]=c;

    int
    main (int argc, char **argv){
    setvbuf(stdout, NULL, _IONBF, 0);
  4. Replies
    22
    Views
    2,325

    also i tried to change it to double aa[n] ; but...

    also i tried to change it to double aa[n] ;
    but it givesme the problem storage size unknown
  5. Replies
    22
    Views
    2,325

    ok but since its a global variable, its telling...

    ok but since its a global variable, its telling me that a b and c arent declared now
  6. Replies
    22
    Views
    2,325

    ok so i set aa[N]=a; ab[N]=b; ...

    ok so i set aa[N]=a;
    ab[N]=b;
    ac[N]=c;
    is that correct?
    but then im not sure how to make it read in the input and point at the variable a, b and c...
  7. Replies
    22
    Views
    2,325

    double aa[N]; double ab[N]; double ac[N]; ...

    double aa[N];
    double ab[N];
    double ac[N];

    int
    main (int argc, char **argv){
    setvbuf(stdout, NULL, _IONBF, 0);
    double a,b,c;
    int n=0;
  8. Replies
    22
    Views
    2,325

    ok so before i pass it into the loop, how would i...

    ok so before i pass it into the loop, how would i declare the 3 arrays i need and how can i add pointers ? can i please get an example..
  9. Replies
    22
    Views
    2,325

    thanks! it worked...i took the g+=f out of the...

    thanks! it worked...i took the g+=f out of the function and into the while loop...now its wokring perfectly...
    can anyone now tell me how i can arrays in this program?the number of souces is of no...
  10. Replies
    22
    Views
    2,325

    double function(double, double, double); int...

    double function(double, double, double);

    int
    main (int argc, char **argv){
    setvbuf(stdout, NULL, _IONBF, 0);
    double a,b,c;
    int n=0;

    while(scanf("%lf %lf %lf", &a, &b, &c)==3){...
  11. Replies
    22
    Views
    2,325

    void

    can u explain to me what the void does and why it is used?
    ive read up on it but it still doent make much sense to me
  12. Replies
    22
    Views
    2,325

    arrays and pointers

    [code]
    i was jsut wondering how to pass in an array to a funciton using a pointer. so far i have declared 3 parallel arrays and now i want to pass the elements in the array into a function. would i...
  13. Replies
    4
    Views
    1,919

    arrays, functions, HELP

    i have another question on arrays
    if the program is to scanf and read in values in this form:

    30.0 50.4 60.0
    40.9 69.9 30.9

    ...hence
    x y z format
  14. Replies
    3
    Views
    1,054

    thanks for the quick response....however that...

    thanks for the quick response....however that previous code u gave me is alot more complicated
    if i put all of this in a function, how could i declare an array and alter the reading loop ?
  15. Replies
    3
    Views
    1,078

    looping functions

    is it possible to loop a function so that it scans multiple inputs?
    i have written a function but it will only take in the first line of input and nothing after
  16. Replies
    2
    Views
    888

    alright i fixed it and put the printf outside...

    alright i fixed it and put the printf outside the loop but now its giving me the wrong value
  17. Replies
    2
    Views
    888

    Help infinity

    how do i delete a post?
  18. Thread: functions

    by beginner1
    Replies
    6
    Views
    988

    yer i was meant to have the function read out how...

    yer i was meant to have the function read out how many loops it is doing aswell...is it possible in the one function? how couldi do this?
  19. Thread: functions

    by beginner1
    Replies
    6
    Views
    988

    what do u mean by' You forgot to actually call...

    what do u mean by' You forgot to actually call hyp_calc in printf. And forward declarations should be outside any functions.'
    sorry im new to this
  20. Thread: functions

    by beginner1
    Replies
    6
    Views
    988

    ok so if i wanted to use the result from the...

    ok so if i wanted to use the result from the function to calculate soemhing else, how would i do this?
    and also, i want to printf the data to read it as it does in the function but it only prints...
  21. Thread: functions

    by beginner1
    Replies
    6
    Views
    988

    functions

    im writing a function to calculate the hypotenuse of a triangle. the inputs are of no more than 100, but come in as eg.
    3.0 4.0
    5.0 6.0
    7.0 8.0

    where the first column is the x distance...
  22. Replies
    2
    Views
    3,503

    Parallel arrays

    hi everyone,
    need some help using parallel arrays
    if the user inputs

    1 4 5
    4 3 3
    1 3 5

    how can i set up 3 parallel arrays to record these values?
  23. Replies
    3
    Views
    1,054

    arrays and functions

    ok so im trying to get my head around all this c stuff..
    if i had inputs from a user say...

    3 4 5
    2 4 7

    and i wanted to compute the sqrt of each row summed, plus the number of loops occuring,...
Results 1 to 23 of 23