No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
int sum=0, a=0, b=0; for (a=1;a<3;a++) for (b=1;b<5;b++) sum+=b; cout <<"sum =" <<sum; The answer is 20, sure, but I have'nt got my head around how it actually works. Could someone explain it step by step please? |
|
Can anyone recommend a good resource for revising for my c++ exam? Thanks |
|
Suppose I have a dynamic array.(trees) The user enters the number of times for the dynamic array to loop based on int num. He has filled the array, say num=3, so he has entered the age of 3 trees into trees[i]. Now he wants to display the age of all … |
|
Hello, I used DW CS3 and photoshop to create a few sites. Currently I create spliced layout in PS and create the rest of the page in DW. Very simple generally.. However, I'm wondering how I would anchor or fix a drop-down style menu to my page. See wwwDOTomarimckenzieDOTcom Here … |
|
Do you do the flow chart first or go straight to the code? I find it easier to do the code first for some reason, maybe this is bad? |
|
Re:
(Using MS Visual Basic 2008) Hi I have Created this program so far for a uni assignement, how ever i need to be able to total the arrays so i can display correct total overall, however the array size has to be defined by the user therefore the size of … |
|
What operator would I use on a variable to increase it for addition from another variable. Thinking loops perhaps. Like the loop add's data to that variable but plus's it on, instead of changes it. So 50 + 60 = 110, instead of 50 + 60 = 60. Also, if … |
|
Re:
(Using MS Visual Basic 2008) Hi, I have been ask to create a program that allows the user to input the hours worked and the payrate for a number of employees (note: Hours work and the payrate can all be differ, there is no set payrate), the number of employees … |
|
Hi again, Suppose we have an array. Array(3). The user has written 5, 6, and 7 to (0) (1) (2) within that array. How would I add them up? If it's like Array(0) + Array(1) + Array (2) that's all very well but.. What if the array size was (10). … |
|
Is there a way to have an array with an undeclared size? It would automatically put the data into the appropriate subscript without delaring the subscript each time. So something like this int Array[] Array + 1, Array + 1, Array + 1, <<array; (equals 3 ) Instead of something … |
|
Hi all... Basically I'm wondering how I complete a loop based on the number of times a user requests it. For instance, I'm doing an employee system that works out pay based on hours. There are lots of rules/criteria about what they pay is recieved based on the input hours. … |