C++11新特性
#include <iostream> using namespace std; int main() { double prices[5] = { 1.1, 1.2, 1.5, 8.5, 9.9 }; for (double x : prices) { cout << x << endl; } cout << "End" << endl; }