question archive int sub=0; for (int i=0; i<10; i++) { if (i%2==1) continue; for (int j =1; j<=5; j++) { if (i*j>30) continue; toplam += j; } } //calculate iteration number?
Subject:Computer SciencePrice:2.86 Bought8
int sub=0;
for (int i=0; i<10; i++)
{
if (i%2==1) continue;
for (int j =1; j<=5; j++)
{
if (i*j>30) continue;
toplam += j;
}
}
//calculate iteration number?
Total iteration number by adding the number of iteration for outer for loop and the inner for loop will be
35
#include <iostream> using namespace std; int main() { int count = 0; cout<<"Count : "<<count<<endl; int toplam = 0; for (int i=0; i<10; i++){ count++; cout<<"Outer Count : "<<count<<endl; if (i%2==1) continue; for (int j =1; j<=5; j++) { count++; cout<<"Inner Count : "<<count<<endl; if (i*j>30) continue; toplam += j; } } }
You can run this code to get the check the count.