1.
//算术运算符 public static void main(String[] args) {System.out.println(3.2+5.01);//若有小数参与,有可能不精确System.out.println(5-1);System.out.println(5*2);System.out.println(10.0/3);//这里不精确System.out.println(10%2);System.out.println();//数值拆分Scanner sc = new Scanner(System.in);System.out.println("请输入你的三位数的·值:");int number = sc.nextInt();int ge=number%10;int shi=number/10%10;int bai=number/100%10;System.out.println(ge);System.out.println(shi);System.out.println(bai); }
2.
#include<stdio.h>
#define M 3
#define N 4
int main(void)
{
int a[M];
int b[M][N] = { {1,2,3,4},{0},{6,7,8,9} };
printf("总字节数:%d\n", sizeof(b));
return 0;
}