Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int myArray[10][10][10];
- for (int i = 0; i <= 9; ++i){
- for (int t = 0; t <=9; ++t){
- for (int x = 0; x <= 9; ++t){
- myArray[i][t][x] = i+t+x;
- }
- }
- }
- for (int i = 0; i <= 9; ++i){
- for (int t = 0; t <=9; ++t){
- for (int x = 0; x <= 9; ++t){
- cout << myArray[i][t][x] << endl;
- }
- }
- }
- system("pause");
- }
- for (int x = 0; x <= 9; ++t){
- for (int x = 0; x <= 9; ++x){
- const std::size_t ARRAY_SIZE = 10;
- int myArray[ARRAY_SIZE][ARRAY_SIZE][ARRAY_SIZE];
- for (std::size_t i = 0; i < ARRAY_SIZE; ++i)
- {
- for (std::size_t j = 0; j < ARRAY_SIZE; ++j)
- {
- for (std::size_t k = 0; k < ARRAY_SIZE; ++k)
- {
- std::assert (i < ARRAY_SIZE && j < ARRAY_SIZE && k < ARRAY_SIZE);
- // Do stuff
- }
- }
- }
Add Comment
Please, Sign In to add comment