image.pnimg

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String a=sc.next(),b=sc.next(),c=sc.next();
        String res;
        if("vertebrado".equals(a)){
            if("mamifero".equals(b)){
                if("onivoro".equals(c)){
                    res="homem";
                }
                else{
                    res="vaca";
                }
            }
            else{
                if("carnivoro".equals(c)){
                    res="aguia";
                }
                else{
                    res="pomba";
                }
            }
        }
        else{
            if("inseto".equals(b)){
                if("hematofago".equals(c)){
                    res="pulga";
                }
                else{
                    res="lagarta";
                }
            }
            else{
                if("hematofago".equals(c)){
                    res="sanguessuga";
                }
                else{
                    res="minhoca";
                }
            }
        }
        System.out.println(res);
    }
}

img

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt(),b=sc.nextInt();
        int c=sc.nextInt(),d=sc.nextInt();
        if(b>c&&d>a&&c+d>a+b&&c>0&&d>0&&a%2==0){
            System.out.println("Valores aceitos");
        }
        else{
            System.out.println("Valores nao aceitos");
        }
    }
}
~~~java
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        switch(n)
        {
            case 61:
                System.out.println("Brasilia");
                break;
            case 71:
                System.out.println("Salvador");
                break;
            case 11:
                System.out.println("Sao Paulo");
                break;
            case 21:
                System.out.println("Rio de Janeiro");
                break;
            case 32:
                System.out.println("Juiz de Fora");
                break;
            case 19:
                System.out.println("Campinas");
                break;
            case 27:
                System.out.println("Vitoria");
                break;
            case 31:
                System.out.println("Belo Horizonte");
                break;
            default:
                System.out.println("DDD nao cadastrado");
                break;
        }
    }
}

img


import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        double x=sc.nextDouble(),y=sc.nextDouble();
        if(x>0&&y>0){
            System.out.println("Q1");
        }
        else if(x<0&&y>0){
            System.out.println("Q2");
        }
        else if(x<0&&y<0){
            System.out.println("Q3");
        }
        else if(x>0&&y<0){
            System.out.println("Q4");
        }
        else if(x==0&&y!=0){
            System.out.println("Eixo Y");
        }
        else if(x!=0&&y==0){
            System.out.println("Eixo X");
        }
        else{
            System.out.println("Origem");
        }
    }
}

img

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        double a=sc.nextDouble(),b=sc.nextDouble(),c=sc.nextDouble();
          if (a < b) {
            double t = a;
            a = b;
            b = t;
        }
        if (a < c) {
            double t = a;
            a = c;
            c = t;
        }
        if (b < c) {
            double t = b;
            b = c;
            c = t;
        }
        if (a >= b + c)
            System.out.println("NAO FORMA TRIANGULO");
        else {
            if (a * a == b * b + c * c)
                System.out.println("TRIANGULO RETANGULO");
            if (a * a > b * b + c * c)
                System.out.println("TRIANGULO OBTUSANGULO");
            if (a * a < b * b + c * c)
                System.out.println("TRIANGULO ACUTANGULO");
            if (a == b && b == c)
                System.out.println("TRIANGULO EQUILATERO");
            else if (a == b || b == c || c == a)
                System.out.println("TRIANGULO ISOSCELES");
        }
    }
}
posted on 2023-04-25 18:48  许七安gyg  阅读(12)  评论(0编辑  收藏  举报
$(document).ready(function() { // 禁止右键 $(document).bind("contextmenu", function(){return false;}); // 禁止选择 $(document).bind("selectstart", function(){return false;}); // 禁止Ctrl+C 和Ctrl+A $(document).keydown(function(event) { if ((event.ctrlKey&&event.which==67) || (event.ctrlKey&&event.which==86)) { //alert("对不起,版权所有,禁止复制"); return false; } }); });