我想在预先存在的表中添加一列.我可以在两个现有列之间添加它吗?我正在研究phpmyadmin.
我编写了一个代码来检查整数是否为素数,每当我调用该函数时,命令行就会挂起.我在Windows 7中使用MingW
#include<iostream>
#include<math.h>
using namespace std;
bool checkPrime(int n);
int main()
{
int t,tempstart;
cout<<checkPrime(6);
return 0;
}
bool checkPrime(int n)
{
bool check=true;
for (int i = 0; i <(int) sqrt(n) ; i++)
{
if(n%i==0)
{
check=false;
cout<<"asas";
break;
}
}
return check;
}
Run Code Online (Sandbox Code Playgroud)