国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
java結(jié)賬系統(tǒng)

import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
public class 輕輕巧巧 {
 public static void main(String[] args)  throws IOException {
  BufferedReader reader = new BufferedReader(new InputStreamReader(
    System.in));
  int a = 0;
  int b = 0;
  int c = 0;
  System.out.println("請(qǐng)輸出結(jié)賬員需要接待的顧客次數(shù):");
  a = Integer.parseInt(reader.readLine());
  for(int i = 0; i < a; i++) {
   b = 0;
   do {
    System.out.println("請(qǐng)輸出商品的單價(jià):");
    int d = Integer.parseInt(reader.readLine());
    if(d < 0) {
     System.out.println("商品的單價(jià)不能小于0!");
     hasMoreGoods = 1;
     continue;
    }
         System.out.println("請(qǐng)輸入商品的數(shù)量:");
         int amount = Integer.parseInt(reader.readLine());
         if(d < 0) {
          System.out.println("商品數(shù)量不能小于0!");
          hasMoreGoods = 1;
          continue;
         }
         totalCost = totalCost + d * amount;
         System.out.println("當(dāng)前總價(jià)為:" + totalCost);
               System.out.println("還有商品需要結(jié)算嗎(輸入1為有," +
                 "其它數(shù)字為沒(méi)有)?");
         hasMoreGoods = Integer.parseInt(reader.readLine());
   
   } while (haMoreGoods == 1);
        System.out.println("本次消費(fèi)為:" + totalCost);
        System.out.println("=====謝謝光臨,歡迎下次再來(lái)!=====");
    
  } 
  System.out.println(serveTimes + "次結(jié)算已經(jīng)結(jié)束,結(jié)賬員可以休息啦!");
 }

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
二叉排序數(shù)的實(shí)現(xiàn)
1020 月餅 (25 分)
在java中如何用鍵盤(pán)輸入一個(gè)數(shù),字符,字符串
android串口(1):java實(shí)現(xiàn)以16進(jìn)制發(fā)送
Java鍵盤(pán)輸入
應(yīng)聘Java筆試時(shí)可能出現(xiàn)問(wèn)題及其答案 (二)
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服