Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
c++ x 16
c x 2
Member Avatar for jdh1231

I have a program that gives me estimation of pi, and time elapsed depends on my input numbers. Can someone please tell me how to compile this? I have the code but it's mystery how to compile and r un it... * Compiler: * mpicc -g -Wall -o name name.c …

Member Avatar for dx9_programmer
0
156
Member Avatar for jdh1231

From the code below, how can I display what elements each processor have? Can someone show me how to do it? I ran it with mpicc -o scatter scatter.c mpirun -np 4 scatter #include <stdio.h> #include <stdlib.h> #include <mpi.h> #define root 0 int main(int argc,char *argv[]) { int rank, p; …

0
63
Member Avatar for jdh1231

Hi, I am trying to put random numbers in array, and use the array for other functions. However, I am stuck on inputting and displaying that array with random numbers. Can someone help? Please ignore other cases, and focus on case 0, which is displaying the elements of the array. …

Member Avatar for np complete
0
308
Member Avatar for jdh1231

Hi. I am pretty new to C++, and trying to understand how to use switch and case statement. So I was practicing with some bubble sorting algorithms, and it seems case 1 and 2 is not workig in my code. Can someone figure out why it's keep breaking please? The …

Member Avatar for NathanOliver
0
168
Member Avatar for jdh1231

Hi. I am doing this program checking & comparing the speed of cache of two loops below, and I keep getting error "Automatic allocation exceeds 2G". I am trying to use dynamic array to make this work. Can anyone help me using Dynamic array? I am little lost on that. …

Member Avatar for WaltP
0
110
Member Avatar for jdh1231

Can someone help me prove by contradiction that for non-negative integers n, 1+2+3....n = n(n+1) / 2 ? I know that conradiction proof is when statement p->q, -q ->-p should be true, there for proved by contradiction. However that does not make sense on above statement..

Member Avatar for rubberman
0
59
Member Avatar for jdh1231

I have a question about finding the running time algorithm calculatino in worst case. the code I have is function problem1(n); 1. sum = 0; 2. for i :=1 to n-1 do 3. for j = 1 to i 4. for k = j+1 to n do 5. sum++ 6. …

0
50
Member Avatar for jdh1231

This is a simple tictactoe game using Constructor member function I have a problem of outputing if someone won the game or tied. Everything seems working fine. Can anyone mind check for me? I tried to find the problem for so long. Thank you. #include <iostream> #include <iomanip> using namespace …

Member Avatar for Marcusflint
0
181
Member Avatar for jdh1231

I have a problem to solve, and I came so close with algorithm, but I am having hard time organizing them so they work. I will post the question and the codes I have. Can someone help me organizing them? The program is expected to read input information from a …

Member Avatar for thines01
0
164
Member Avatar for jdh1231

So, I am suppose to make the bar chart looking like the picture attached below using Array and for loops. It suppose to output a bar chart (using "*") of temperatures for the hours. Range of temperatures should be from -30 to 120. Each * should have amount of 3 …

0
125
Member Avatar for jdh1231

Right now, I am learning how to use an Array. How the program should work is, I declare how many numbers I want to input, and then, put numbers in. At last, I can choose either find the maximum, sum, or product. The program seems right to me but it's …

Member Avatar for jdh1231
0
291