cs161AWinter2024/nestedfor.cpp

17 lines
278 B
C++

#include <iostream>
using namespace std;
int main(){
int count = 0;
for(int i=0; i < 8; i++){
for(int j=0; j < 9; j++){
for(int k=0; k < 10; k++){
count = count + 1;
}
}
}
cout << "Loops ran: " << count << " times" << endl;
return 0;
}