//含有七和被七整除舍去
public class test1 {
public static void main(String[] args){
for (int i = 1; i <=100 ; i++) {
if(i%7==0||i%10==7||i/10==7){
continue;
}
System.out.println(i);
}
}
}
求平方根
//输入大于2的整数,求平方根,小数舍去
public class test1 {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int x=sc.nextInt();
int a=0;
if(x<=2){
System.out.println("请输入大于2的整数");
}else{
for(int i=2;i<x;i++){
if(i*i>x){
a=i-1;
break;
}
if(i*i==x)
{
a=i;
break;
}
}
}
System.out.println(a);
}
}
是不是质数
//输入一个正整数,判断是不是一个质数
public class test1 {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int x=sc.nextInt();
boolean flag=true;
for (int i = 2; i <x ; i++) {
if(x%i==0){
System.out.println("不是质数");
flag=false;
break;
}
}
if(flag)
System.out.println("是质数");
}
}
Time and Uncertainty 1 Time and Uncertainty States and Observations • discrete-time models: we view the world as a series of snapshots or time slices • the time interval ∆ between slices, we assume to be the same for every interval • Xt: denotes the se…
前言 Web 开发已经成为现代软件开发的核心领域之一,许多应用程序和服务都通过 Web 来与用户和其他系统交互。Python 作为一门广泛使用的编程语言,提供了多种 Web 开发框架,其中最流行的两个框架是 Flask 和 Django。
Flask 是一个轻量级的 W…