1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

I am having a seriosly difficult time in programming c++

Discussion in 'C++' started by husseinballard, Mar 25, 2010.

  1. husseinballard

    husseinballard New Member

    This is c++
    This is one of the practice questions I am faced with :

    Fill in the blank, so that this code sums only the high temperature!
    // 0 is high, 1 is low
    the problem is sum=0;
    for (k=0; k<50; k++)
    for (j=0; j<7; j++)
    sum= sum + _______________

    My answer is sum= sum+j++,and J++
    I have been told this is incorrect
    I have been looking at this code and I do not see enough information to answer this question There aren't any real temps. Please tell me what you think
  2. davidk

    davidk New Member

    Is this the whole code? Please use tags
    Also, could you please tell about the problem more precisely. What did you try to solve the trouble and why?
    Nothing is clear in your post.
  3. xpi0t0s

    xpi0t0s Mentor

    There isn't enough information to answer the question. The question refers to high temperature; are there some temperature values stored in an array (say, a 7 by 50 element array) that you haven't told us about?

    Have a look through the whole paper. You might find a section that says something along the lines of "for the following questions you will need this data..."

Share This Page