构造一个C++代码，用于打印斐波那契数列的前10个数字
#include <iostream> 
  
int main() 
{ 
    int n1 = 0, n2 = 1, n3, i, number; 
  
    std::cout << "输入元素的数量："; 
    std::cin >> number; 
    std::cout << n1 << " " << n2 << " "; // 打印0和1 
  
    for (i = 2; i < number; ++i) // 循环从2开始，因为0和1已经打印了 
    { 
        n3 = n1 + n2; 
            std::cout << n3 << " "; 
            n1 = n2; 
            n2 = n3; 
    } 
    return 0; 
}