freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java實(shí)驗(yàn)報(bào)告-展示頁(yè)

2025-02-16 15:15本頁(yè)面
  

【正文】 0]。 (\n)。y=9。x=9。 int x,y。 } } 2定義一個(gè) int型的一維數(shù)組,包含 10個(gè)元素,分別賦值為 110, 然后將數(shù)組中的元素都向前移一個(gè)位置,即, a[0]=a[1],a[1]=a[2],… 最后一個(gè)元素的值是原來(lái)第一個(gè)元素的值,然后輸出這個(gè)數(shù)組 import .*。 (\n )。 (\n )。 }aver=sum/。 else max=a[i]。 min=max=a[0]。i。 int b,i,min=0,max=0,sum=0,aver。 } } 實(shí)驗(yàn)四 1. 定義一個(gè) int型的一維數(shù)組,包含 10個(gè)元素,從鍵盤分別賦一些隨機(jī)整數(shù),然后求出所有元素的最大值,最小值,平均值,和值,并輸出出來(lái) import .*。 (Maxmun temperature:+max)。 } average=sum/day。iday1。i++){ if(tem[i]tem[i+1]) max=tem[i+1]。 for(int i=0。 } float max=tem[0]。i++){ tem[i]=()。 for(int i=0。 day=()。 float sum=0,average=0。s temperatures?)。 import .*。 } (應(yīng)繳黨費(fèi): +money)。salary=1500){ money=(float)(salary*)。 } else if(salary=801amp。amp。salary=600){ money=(float)(salary*)。 } else if(salary=401amp。amp。 salary=()。 float salary。 public class Experiment3_3 { public static void main(String args[]){ Scanner reader=new Scanner()。 } } } } 3實(shí)驗(yàn)要求: ? 使用 Java編寫控制臺(tái)應(yīng)用程序 ? 計(jì)算有固定收入的黨員每月所交納的黨費(fèi)。k=i。 } (\n)。j++){ (%d*%d=%2d,i,j,i*j)。i++){ for(int j=i。 for(int i=1。 } (\n)。j++){ (%d*%d=%2d,i,j,i*j)。i++){ for(int j=1。 for(int i=1。 } (\n)。j++){ (%d*%d=%2d,j,i,i*j)。i++){ for(int j=1。 } } } } : ? 使用 Java編寫控制臺(tái)應(yīng)用程序 ? 輸出九九乘法表 public class Experiment3_2 { public static void main(String args[]){ for(int i=1。year%100!=0||year%400==0){ (本月 29天 )。 if(year%4==0amp。 case 2: (請(qǐng)用戶輸入年份: )。 case 4: case 6: case 9: case 11:(本月 30天 )。 switch(month){ case 1: case 3: case 5: case 7: case 8: case 10: case 12:(本月 31天 )。 (請(qǐng)用戶輸入月份: )。 public class Experiment3_1 { public static void main(String args[]){ Scanner reader=new Scanner()。break。break。break。break。break。 int score=()。 90分以上 A級(jí) 80~89 B級(jí) 70~79 C級(jí) 60~69 D級(jí) 60分以下 E級(jí) import 。)。 (39。j=i。i10。 } (sum=+sum)。i++) { sum+=temp。 for(int i=1。 } } 2. 編寫一個(gè)程序,使用 for循環(huán)計(jì)算 8+88+888+8888+… 的前十項(xiàng)之和 要求:在上述程序中設(shè)置斷點(diǎn)和觀察點(diǎn)進(jìn)行單步調(diào)試 public class Experiment2_2 { public static void main(String[] args) { int sum=0。 else if(x==0) (1)。 int x=()。 } } 實(shí)驗(yàn)二 1. 有一函數(shù),編寫一個(gè)程序,從鍵盤輸入一個(gè) x值,程序輸 出 y的值 import 。 i++。amp。 int sum=0。 (興趣愛(ài)好 )。 (學(xué)號(hào) )。 (性別 )。 ( *************************)。 實(shí)驗(yàn)一 ,在屏幕上顯示如下信息: ************************** wele你的名字 ************************** 想一想:怎樣讓用戶在運(yùn)行程序的時(shí)候指定 “你的名字 ” public class Experiment1_1 { public static void main(String[] args) { ( *************************)。 ( wele 寧 )。 } } 2. 寫一個(gè) Java程序打印出下列信息 : ? 姓名 ? 性別 ? 年齡 ? 學(xué)號(hào) ? 系和專業(yè) ? 興趣愛(ài)好 public class Experiment1_2 { public static void main(String args[]) { (姓名 )。 (年齡 )。 (系和專業(yè) )。 } } ,使用 while循環(huán)計(jì)算 1~1000之間能被 3和 7同時(shí)整除的整數(shù)之和 public class Experiment1_3 { public static void main(String[] args) { int i=1。 while(i=1000) { if(i%7==0amp。i%3==0) sum+=i。 } (sum=+sum)。 public class Experiment2_1 { public static void main(String[] args) { Scanner reader=new Scanner()。 if(x0) (1+2*x)。 else (1+3*x)。 int temp=8。i=10。 temp=temp*10+8。 } } 3. 利用 for循環(huán)打印 9*9 表 1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 1*4=4 2*4=8 3*4=12 4*4=16 1*5=5 2*5=10 3*5=15 4*5=20 5*5=25 1*6=6 2*6=12 3*6=18 4*6=24 5*6=30 6*6=36 ??????????????03101021xxxxxy 1*7=7 2*7=14 3*7=21 4*7=28 5*7=35 6*7=42 7*7=49 1*8=8 2*8=16 3*8=24 4*8=32 5*8=40 6*8=48 7*8=56 8*8=64 1*9=9 2*9=18 3*9=27 4*9=36 5*9=45 6*9=54 7*9=63 8*9=72 9*9=81 要求:對(duì)上述程序中的方法和語(yǔ)句加上注釋 public class Experiment2_3 { public static void main(String[] args) { for(int i=1。i++) { for(int j=1。j++) (%4d*%d=%d,i,j,j*i)。\n39。 } } } 4. 從鍵盤輸入一個(gè)百分制的成績(jī),輸出相應(yīng)的等級(jí)。 public class Experiment2_4 { public static void main(String[] args) { Scanner reader=new Scanner()。 switch(score/10) { case 10: case 9: (A)。 case 8: (B)。 case 7: (C)。 case 6: (D)。 case 5: case 4: case 3: case 2: case 1: case 0: (E)。 } } } 實(shí)驗(yàn)三 : ? 使用 Java編寫控制臺(tái)應(yīng)用程序 ? 用戶從鍵盤輸入月份,使用 switch語(yǔ)句輸出該月份的天數(shù) ? 如果輸入月份為 2月份,則程序提示讓用戶輸入年份,再輸出結(jié)果 import .*。 int month,day,year。 month=()。break。break。 year=()。amp。 } else{ (本月 28天 )。i=9。j=i。 ( )。 } (\n)。i=9。j=9。 ( )。 } (\n)。i=9。j=9。 ( )。 for(int k=1。k++){ ( )。月工資收入 400元及以下者,交納月工資總額的 %;月工資收入 401~ 600元者,交納月工資總額的 1%;月工資收入 601~ 800元者,交 納月工資總額的 %;月工資收入 801~ 1500元者,交納月工資總額的 2%;月工資收入 1500 元以上者,交納月工資總額的 3%; import 。 (請(qǐng)用戶輸入工資: )。 float money = 0。 if(salary=400amp。salary=0){ money=(float) (salary*)。amp。 } else if(salary=601amp。salary=800){ money=(float)(salary*)。amp。 } else{ money=(float)(salary*)。 } } ? 4. 實(shí)驗(yàn)要求: ? 使用 Java編寫控制臺(tái)應(yīng)用程序 ? 用戶從鍵盤輸入 n天的溫度, n由用戶指定,求出平均溫度、最高和最低溫度,要求輸出結(jié)果如下圖所示。 public class Experiment3_4 { public static void main(String args[]){ (How many day39。 Scanner reader=new Scanner()。 int day=0。 float []tem=new float[day]。iday。 sum+=tem[i]。 float min=tem[0]。iday1。 } for(int i=0。i++){ if(tem[i]tem[i+1]) min=tem[i+1]。 (Average temperature:+average)。 (Minmum temperature:+min)。 public class j1 { public static void main(String args[]){
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1