+ 1
Help with nested for loop. Cpp
I wanted to use a nested for loop to calculate the difference between 2 different times
2 Respostas
+ 1
I don't exactly know what you want to know. Difference between the 2 incremental variables of the for loops?
#include <math>
#include <vector>
int dif;
vector <int> results;
for (int i = 0; i<10; i++){
for(int j = 0; j<10; j++){
dif = abs(i) - abs(j);
results.push_back(abs(dif));
}
}
0
Thanks bro