Oh... I see the problem. Change the following line:
For i as Integer = 0 To dataGridView1.Rows.Count - 1
Since the array of rows starts from 0, and in the case of your datagridview ends in 3 (0, 1, 2, 3)
Oh... I see the problem. Change the following line:
For i as Integer = 0 To dataGridView1.Rows.Count - 1
Since the array of rows starts from 0, and in the case of your datagridview ends in 3 (0, 1, 2, 3)
In the first place, you cannot assign a const
value in the class header. Second, you didn't declare the variable balance
in the void computeInterest()
function
Good one
remember marking solved threads as solved ;)
assuming you got column size compatibility between arrays, you must create an array with x
quantity of rows, x
being the sum of array1's rows and array's 2 rows (I assume you know these sizes, since you had to declare the arrays sizes). After that, you create two nester for loops to go through both arrays one after another. This way:
int sizex = 4, sizey1 = 2; sizey2 = 3;
int array1[sizex][sizey1]={{1,2,3,4},{2,3,4,5}};
int array2[sizex][sizey2]={{3,4,5,6},{4,5,6,7},{5,6,7,8}};
int array3[sizex][sizey1+sizey2];
for (int x = 0 ; x < sizex ; x+=1)
{
for (int y = 0 ; y < sizey1 ; y+=1)
{
array3[x][y] = array1[x][y];
}
}
for (int x = 0 ; x < sizex ; x+=1)
{
for (int y = sizey1 ; y < sizey2 ; y+=1)
{
array3[x][y] = array1[x][y];
}
}
this way, array3
would be:
{1,2,3,4}
{2,3,4,5}
{3,4,5,6}
{4,5,6,7}
{5,6,7,8}
i think it's time to give this thread a little bump... to bring some interesting discussions with new members of the community... hehe
somewhere back in the thread i read a comment saying something like this...
if God created human beings, then he should hate himself for creating gays, as they have a design flaw He himself did
or something like that...
ok... according to catholic teachings, God did create mankind at his image... but He also gave mankind something called "free will" so we do whatever we feel like doing... He did not make that flaw in human design... mankind took the wrong way in that aspect...
NOTE: i clearly stated "according to catholic teachings" so don't come up over me telling me i'm an idiot or anything... (it has happened a lot in this thread with a lot of other people)
it's not that hard anyways... all you need are two arrays, and shift the character positions between them... it should go something like this:
#include<iostream>
#include<cstdlib>
using namespace std;
int main(){
int i=0,j=0;
char string[100],permut[100],temp;
gets(string);
strcpy(permut,string);
puts(permut);
i=0;
getchar();
while (string[i]!='\0'){
while (permut[j]!='\0'){
temp=permut[j];
permut[j]=permut[i];
permut[i]=temp;
puts(permut);
j++;
}i++;
}getchar();
_exit(0);
return 0;
}
i think it's enough for a lead start... it doesn't show all the permutations, but the logic you need to use is somewhat like that...