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?
Type: Posts; User: ma_atie
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?
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...
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
...
Thank you so much for that code. It's so helpful.
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?
I've never used cout<<stars<<"\n";
Does that just mean printf?
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...
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....
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?
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...
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++)