Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
57% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
2
Posts with Downvotes
1
Downvoting Members
2
0 Endorsements
Ranked #22.6K
Ranked #2K
~26.3K People Reached
Favorite Forums

6 Posted Topics

Member Avatar for Aeonix

It's not even C# (should have been System.Console.WriteLine), it's a combination of static function call from C++ with objects from C#. How Moschops said ... go with cout.

Member Avatar for Aeonix
0
23K
Member Avatar for Rafiii

I don't quite understand why you need to store each int in a array. Wouldn't it be simpler to have a single array of int's? Anyway, if you want it like that you can use a pointer to a array of int arrays. Then you can use each array by …

Member Avatar for Rafiii
0
620
Member Avatar for Ahmed_62

Here is a nifty way of doing it: int* DecToBin(int n, int* output) { if(n == 0) return &(*output = 0); if(n == 1) return &(*output = 1); output = DecToBin(n / 2, output); return &(*(++output) = n % 2); } in the output field put a array of int's …

Member Avatar for Ion_1
0
289
Member Avatar for phoenix254

Just use this: double calc_pi(int nrDigitals) { double a = 1; double b = 1 / sqrt(2); double t = (double)1 / 4; double p = 1; double temp_a; double temp_b; for(int i = 0; i < nrDigitals; ++i) { temp_a = (a + b) / 2; temp_b = sqrt(a …

Member Avatar for Ion_1
-1
2K
Member Avatar for lewashby

It's simple, first, you initialize the values with 0 and 1 to have valid input in case strok fails. Then you call strtok to parse the input that you get from the constructor as a char pointer. Strok is a function that splits C - string based on a delimiter(also …

Member Avatar for Ion_1
0
494
Member Avatar for Ryskie

Of course, you can output the data in a file instead of console and also get the data fron the console instead of generating it! #include <iostream.h> #include <cstdlib.h> int f91(int n) { if(n >= 101) return (n - 10); if(n <= 100) return f91(f91(n + 11)); } int main(int …

Member Avatar for Ion_1
-2
210

The End.