Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5925 谢锦卓 小明养猪的故事 C++ Compile Error 0 MS 0 KB 586 2024-12-21 10:10:04

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a; cin>>a; for(int i=1;i>=2;i++){ int n; cin>>n; int a=1,b=2,c; for(int j=1;j<=s1;i\j++){ c=a+b; a=b; b=c; } if(n==2) cout<<b<<endl; if(n==1) cout<<a<<endl; if(n==3) cout<<c<<endl; } return 0; }


Run Info:

Main.cc:14:9: error: stray '\' in program
         for(int j=1;j<=s1;i\j++){
         ^
Main.cc: In function 'int main()':
Main.cc:14:24: error: 's1' was not declared in this scope
         for(int j=1;j<=s1;i\j++){
                        ^
Main.cc:14:27: warning: for increment expression has no effect [-Wunused-value]
         for(int j=1;j<=s1;i\j++){
                           ^
Main.cc:14:29: error: expected ')' before 'j'
         for(int j=1;j<=s1;i\j++){
                             ^
Main.cc:14:32: error: expected ';' before ')' token
         for(int j=1;j<=s1;i\j++){
                                ^