cs161AWinter2024/nestedfor.cpp

17 lines
278 B
C++
Raw Permalink Normal View History

2024-02-28 20:06:02 +00:00
#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;
}