c++creare array code example
Example: creare array con c++
#include <iostream>
int main()
{
int myArray[] {2, 4, 6, 8, 10};
for (int i=0; i<5; i++)
{
std::cout << "index: " << i << " - value: " << myArray[i] << "\n";
}
return 0;
}
#include <iostream>
int main()
{
int myArray[] {2, 4, 6, 8, 10};
for (int i=0; i<5; i++)
{
std::cout << "index: " << i << " - value: " << myArray[i] << "\n";
}
return 0;
}