Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
138851 何兴驰 判断质数(使用while循环) C++ Compile Error 0 MS 0 KB 210 2025-11-30 11:31:43

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ bool f=t; int n,i=2; cin>>n; while(i<n){ if(n%i==0){ f=0; } i++; } if(f==0){ cout<<"No"; }else{ cout<<"Yes"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:9: error: 't' was not declared in this scope
  bool f=t;
         ^