16 lines
366 B
C++
16 lines
366 B
C++
/*
|
|
|
|
We use the sizeof Opperator here to determine the size of the Array "numbers" {in this case 10} ;
|
|
After that we print "i" Element in "numbers"
|
|
|
|
*/
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int numbers[10] = {1,2,3,4,5,6,7,8,9,10};
|
|
for (int i = 0; i < sizeof(numbers) / sizeof(numbers[0]) ; i++) {
|
|
cout << numbers[i] << "\n";
|
|
}
|
|
} |