package text1; import java.util.Scanner; public class text11 { public static void main(String[] args){ Scanner sc =new Scanner(System.in); System.out.print("输入圆的半径"); int a =sc.nextInt(); System.out.print("圆的周长是:"+a*2*3.14+"圆的面积是:
package study01; import java.util.Scanner; public class Sort { /** * 需求:由键盘输入三个整数分别存入变量a.b.c,对他们进行 排序(使用if-else),并且从小到大输出 * */ public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("a="); int a = sc.nextI
要求说明: 输入三个整数x,y,z,请把这三个数由小到大输出. 实现代码: 第1种方法: import java.util.Scanner; public class xyzMaxMin{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("请输入3个整数:"); int x = sc.nextInt(); int y = sc.nextInt
#include<stdio.h> int max(int a, int b)/*定义函数*/ { if (a > b) return a; else return b; } int main() { int a, b, c, maxvalue; printf("请输入三个数:\n"); scanf_s("%d%d%d", &a, &b, &c); maxvalue = max(a, b);/*调用函数*/ maxvalue
链接:https://www.nowcoder.com/acm/contest/141/J来源:牛客网 Eddy has graduated from college. Currently, he is finding his future job and a place to live. Since Eddy is currently living in Tien-long country, he wants to choose a place inside Tien-long country