+ 1

Help with nested for loop. Cpp

I wanted to use a nested for loop to calculate the difference between 2 different times

9th Feb 2018, 10:27 PM
J@m2Bklyn
J@m2Bklyn - avatar
2 odpowiedzi
+ 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)); } }
9th Feb 2018, 11:47 PM
Alex
Alex - avatar
0
Thanks bro
10th Feb 2018, 1:29 AM
J@m2Bklyn
J@m2Bklyn - avatar