兩個小算法
一.
6個人一個房間 有X個學生 問需要多少個房間Y表示 公式是
X=31;//假設X=31
y=(x+5)/6;
二.
0-9按順序循環
x=0;
while(true){
x=(x+1)%10;
System.out.println(x);
}
兩個小算法
一.
6個人一個房間 有X個學生 問需要多少個房間Y表示 公式是
X=31;//假設X=31
y=(x+5)/6;
二.
0-9按順序循環
x=0;
while(true){
x=(x+1)%10;
System.out.println(x);
}