โx
#include <iostream>
#include <string>
using namespace std;
โ
int main() {
string cars[5] = {"Volvo", "BMW", "Ford"};
cars[3] = "Mazda";
cars[4] = "Tesla";
for(int i = 0; i < 5; i++) {
cout << cars[i] << "\n";
}
return 0;
}
โ
#include <iostream>
#include <string>
using namespace std;
โ
int main() {
string cars[5] = {"Volvo", "BMW", "Ford"};
cars[3] = "Mazda";
cars[4] = "Tesla";
for(int i = 0; i < 5; i++) {
cout << cars[i] << "\n";
}
return 0;
}
โ