Search:

Type: Posts; User: ma_atie

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    6,966

    Then should I change the retrun type on the...

    Then should I change the retrun type on the function to a double and return x_bar and y_bar? Or is there another way to do it?
  2. Replies
    4
    Views
    6,966

    Using arrays in functions in C

    I want to put functions into my code to make it neater but when I do the wrong values print. If I leave the code without the functions it works perfectly. If I put in the functions it prints the...
  3. First entry of a file and transfer rest of file to an array

    I need to get the first number from the file as it gives the maximum elements of the array and then print the arrays. The file is called expt1.txt and contains the following

    3
    7 4
    8 7
    9 9
    ...
  4. Thank you so much for that code. It's so helpful.

    Thank you so much for that code. It's so helpful.
  5. I've tried a few different ways to write it with...

    I've tried a few different ways to write it with printf.



    printf("%d", i);

    But I don't see how that will print the stars.
    How would I use printf to print the stars?
  6. I've never used cout

    I've never used cout<<stars<<"\n";

    Does that just mean printf?
  7. I also thought I could count the number of...

    I also thought I could count the number of entries in the file and then print that number of stars but I don't know how to print the number of stars to correspond the number of letters in the string...
  8. How do I change the contents of the file to *

    I need to change the contents of this file to *
    For each letter in the file I need a *
    It's a programme to play hangman so I need the stars to 'cover' the letters that the user will have to guess....
  9. Replies
    8
    Views
    1,510

    I've never studied C++ programming but I'm...

    I've never studied C++ programming but I'm guessing find(), end() and insert() are functions in C++??

    If they are, do you know any equivalent in C?
  10. Replies
    8
    Views
    1,510

    Thank you for all your suggestions, they're...

    Thank you for all your suggestions, they're really helpful.

    Yes I did mean run time when I said I wanted to shorten the time for it to compile.

    The only thing is I can't use any formula for...
  11. Replies
    8
    Views
    1,510

    Fasten up a programme with large numbers

    I have written a programme to find the first five perfect numbers:



    int main(void)
    {
    long int lim=33550337;
    long int j, i, sum;

    for(j=1; j<lim; j++)
Results 1 to 11 of 11