Compile Error

foo.cc:2:4: error: 'cout' does not name a type
    2 |    cout << "输入要变化的数字。" << endl ;
      |    ^~~~
foo.cc:3:4: error: 'cin' does not name a type
    3 |    cin >> x7 ;
      |    ^~~
foo.cc:5:4: error: expected unqualified-id before 'for'
    5 |    for ( long long i = 1 ; i <= x7 ; i ++ )
      |    ^~~
foo.cc:5:28: error: 'i' does not name a type
    5 |    for ( long long i = 1 ; i <= x7 ; i ++ )
      |                            ^
foo.cc:5:38: error: 'i' does not name a type
    5 |    for ( long long i = 1 ; i <= x7 ; i ++ )
      |                                      ^
foo.cc:9:11: error: expected constructor, destructor, or type conversion before '(' token
    9 |    printf ( "%.d的阶乘:%.lld" , x7 , y7 ) ;
      |           ^
foo.cc:10:4: error: 'cout' does not name a type
   10 |    cout << "(" << y7 << ")"<< endl ;
      |    ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1030 1~N求和
语言
C++
递交时间
2022-03-31 13:05:31
评测时间
2022-03-31 13:05:31
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes