當前位置:首頁 » 編程語言 » java取款機

java取款機

發布時間: 2023-01-03 00:29:35

java編寫的模擬ATM取款機程序

我現寫的: import java.util.Scanner;public class ATM {

private static String theName = "admin";
private static String thePassword = "123456";

private static int balance = 10000;

public static void getBalance(){
System.out.println("當前余額:" + balance);
}

public static void drawMoney(Scanner sc){
int money = 0;
System.out.println("請輸入取款金額:");
money = sc.nextInt();
String type = "";
if (balance > 0) {
if (balance >= money) {
if (money <= 5000) {
balance = balance - money;
type = "請在30秒內提取現金...\n剩餘余額:"+balance;
} else if (money <= 0) {
type = "金額錯誤";
} else {
type = "超出最大限制金額";
}
} else {
type = "超出最大余額";
}
} else {
type = "余額不足";
}
System.out.println(type);
}

public static void bankMoney(Scanner sc){
int money = 0;
System.out.println("請輸入存儲金額:");
money = sc.nextInt();
String type = "";
if (money > 0) {
balance = balance + money;
type = "存儲成功,現有餘額:" + balance;
} else {
type = "存儲金額不能為負";
}
System.out.println(type);
}

public static void updatePass(Scanner sc){
String oldPass = "";
String newPass1 = "";
String newPass2 = "";
while(true){
System.out.println("請輸入原密碼:");
oldPass = sc.next();
if (oldPass.equals(thePassword)) {
break;
} else {
System.out.println("密碼錯誤,請重新輸入");
}
}
while(true){
System.out.println("請輸入新密碼");
newPass1 = sc.next();
System.out.println("再次輸入");
newPass2 = sc.next();
if (newPass1.equals(newPass2)) {
if (!isSame(newPass1)) {
thePassword = newPass1;
System.out.println("修改成功");
break;
} else {
System.out.println("所有字元不能相同,重新輸入");
}
} else {
System.out.println("兩次輸入不一致,重新輸入");
}
}
}

public static boolean isSame(String string){
boolean bool = false;
for (int i = 0; i < string.length() - 1; i++) {
char char1 = string.charAt(i);
for (int j = i + 1; j < string.length(); j++) {
char char2 = string.charAt(j);
if (char1 == char2) {
bool = true;
break;
}
}
}
return bool;
}

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true){
String name = "";
String password = "";
System.out.println("請輸入賬號:");
name = sc.next();
System.out.println("請輸入密碼:");
password = sc.next();
if (name.equals(theName) && password.equals(thePassword)) {
break;
} else {
System.out.println("賬號或密碼錯誤,請重新輸入!");
}
}
while(true){
int operate = 0;
System.out.println("請選擇你要進行的操作:\n1、查詢 2、取款 3、存款 4、修改密碼 0、退出");
operate = sc.nextInt();
if (0 == operate) {
System.out.println("謝謝使用!");
break;
} else if (1 == operate) {
getBalance();
} else if (2 == operate) {
drawMoney(sc);
} else if (3 == operate) {
bankMoney(sc);
} else if (4 == operate) {
updatePass(sc);
}
}

}
}

⑵ 求高手用JAVA編寫一個模擬ATM機取款業務需求如下:

樓主您好,編碼如下,直接運行即可:

import java.util.Scanner;

public class AtmGetMoney {

public static void main(String[] args) {
String password = "111111";
int count = 0;
int a = 0;
while(count<3){
System.out.println("請輸入銀行卡密碼: ");
Scanner scan = new Scanner(System.in);
String passwd = scan.nextLine();
while(passwd.equals(password)){
System.out.println("請輸入取款金額: ");
int amount = scan.nextInt();
if(amount%100 == 0 && amount <= 1000){
System.out.println("您的取款金額為: "+amount);
System.out.println("交易完成,請讀卡!");
a = a + 1;
break;
}
else {
System.out.println("只能提取100元紙幣,要求最低0,最高1000!");
continue;
}
}
if (a == 1){
break;
}
else if (count < 2) {
System.out.println("銀行卡密碼錯誤");
count = count + 1;
continue;
}
else {
System.out.println("密碼錯誤請讀卡");
break;
}

}

}

}

⑶ 使用Java語言中(類和對象)編寫: ATM自動存取款機的程序

很簡單的例子,我把代碼貼出來吧
import java.util.Scanner;
public class ATM {
/**
* @param args
*/
public static void main(String[] args) {
Scanner in = null;
int result;
double drawMoney;
double depositMoney;
Account account = new Account();
while (true) {
System.out.println("☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆(ABC)中國農業銀行ATM自動存取款機☆☆☆☆☆☆☆☆☆☆☆☆☆");
System.out.println("\n\t\t\t\t1.存款業務");
System.out.println("\n\t\t\t\t2.取款業務");
System.out.println("\n\t\t\t\t3.查詢余額");
System.out.println("\n\t\t\t\t4.退出ATM系統");
System.out.println("\n☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆中國農業銀行歡迎您的使用☆☆☆☆☆☆☆☆☆☆☆☆☆☆☆");
in = new Scanner(System.in);
switch (in.nextInt()) {
case 1:
System.out.println("請輸入您的存款數額!");
depositMoney = in.nextDouble();
if(depositMoney < 0)
System.out.println("您的輸入無效,請重新輸入!");
result = account.deposit(depositMoney);
if(result == 0){
System.out.println("存款業務完成,是否顯示余額?Y/N");
if("Y".equalsIgnoreCase(in.next())){
System.out.println("您當前的余額為:"+account.checkCurrent());
}else {
break;
}
}else {
System.out.println("無法完成交易!");
break;
}
break;
case 2:
System.out.println("請輸入您的取款數額!");
drawMoney = in.nextDouble();
if (drawMoney < 0) {
System.out.println("您的輸入無效,請重新輸入!");
}
result = account.withDraw(drawMoney);
if (result == 0) {
System.out.println("存款業務完成,是否顯示余額?Y/N");
if("Y".equalsIgnoreCase(in.next())){
System.out.println("您當前的余額為:"+account.checkCurrent());
}else {
break;
}
} else {
System.out.println("無法完成交易!");
break;
}
case 3:
System.out.println("您當前的余額為:"+account.checkCurrent());
break;
case 4:
break;
default:
break;
}
}
}
}

public class Account {
private double currentMoney;//當前余額
public double getCurrentMoney() {
return currentMoney;
}
public void setCurrentMoney(double currentMoney) {
if (currentMoney > 0) {
this.currentMoney = currentMoney;
}
}
/**
* 取款業務
* @param drawMoney
* @return 0代表成功,1代表失敗
*/
public int withDraw(double drawMoney) {
if (currentMoney > 0 && drawMoney <= currentMoney) {
currentMoney -= drawMoney;
} else {
System.out.println("您的余額已不足!");
return 1;
}
return 0;
}
/**
* 存款業務
* @param depositMoney
* @return 0代表成功,1代表失敗
*/
public int deposit(double depositMoney) {
if (depositMoney > 0) {
currentMoney += depositMoney;
return 0;
}else {
System.out.println("您提交的存款為負數,無法完成存款交易");
return -1;
}
}
/**
* 查詢余額業務
* @return
*/
public double checkCurrent() {
return currentMoney;
}
}

⑷ 利用JAVA語言二重循環實現ATM機取款過程!

public static void main(String[] args) {
Scanner s, money;
int pass = 1111;
int tempass;
int choose = 0;
mkar: for (int i = 0; i < 3; i++) {
s = new Scanner(System.in);
money = new Scanner(System.in);
tempass = s.nextInt();
if (tempass == pass) {
for (;;) {
System.out.println("請輸入1到9的數字選擇你要取款的");
choose = money.nextInt();
switch (choose) {
case 1:
System.out.println("取款100");
break;
case 2:
System.out.println("取款200");
break;
case 3:
System.out.println("取款300");
break;
case 4:
System.out.println("取款400");
break;
case 5:
System.out.println("取款500");
break;
case 6:
System.out.println("取款600");
break;
case 7:
System.out.println("取款700");
break;
case 8:
System.out.println("取款800");
break;
case 9:
System.out.println("取款900");
break;
case 0:System.out.println("操作成功退出");
break mkar;
}
}
} else {
System.out.println("密碼錯誤");
}
}
}
看下是不是你的要求,也可以自己改下

⑸ Java編程實現程序用於模擬ATM取款機。

package demo;

import java.util.Scanner;

public class Test3 {
public static void main(String[] args) {
Scanner scanner =new Scanner(System.in);
int cnt=3;
String username = null;
String password = null;
double money = 1000;
String targetName = "admin33";
double targetMoney = 1000;
while(true){

if(username!=null&&password!=null){

if("admin".equals(username) && "123".equals(password)){
System.out.println("歡迎光臨");
while(true){
System.out.println("請選擇您的操作 1 取錢 2 存錢 3 轉賬 4 查詢 5 退出 ");
int n = scanner.nextInt();
if(n==1){//取錢
System.out.println("請輸入金額");
int getter = scanner.nextInt();
if(getter>=0){
if(getter<=5000){
if(getter<=money){
money-=getter;
}else{
System.out.println("余額不足");
}
}else{
System.out.println("單筆只能取5000及以下");
}
}else{
System.out.println("銀行不到給");
}
}else if(n==2){//存錢
System.out.println("請輸入金額");
int save = scanner.nextInt();
if(save>=0){
money+=save;
}
}else if(n==3){//轉賬
System.out.println("請輸入目標賬戶");
String target = scanner.next();
if(target.equals(targetName)){
System.out.println("請輸入金額");
int getter = scanner.nextInt();
if(getter>=0){
if(getter<=5000){
if(getter<=money){
money-=getter;
targetMoney+=getter;
}else{
System.out.println("余額不足");
}
}else{
System.out.println("單筆只能取5000及以下");
}
}else{
System.out.println("銀行不到給");
}
}
}else if(n==4){//查詢
System.out.println(money);
}else if(n==5){//退出
System.exit(0);
}else{
System.out.println("沒有該項服務");
}
}
}else{
cnt--;
System.out.println("輸入錯誤,您還有"+cnt+"次機會");
username=null;
password=null;
if(cnt<=0){
System.out.println("對不起,您的賬號被凍結,請到最近的營業廳解除凍結");
System.exit(0);
}
}
}else{
System.out.println("請輸入您的賬號");
username = scanner.next();
System.out.println("請輸入您的密碼");
password = scanner.next();
}
}
}
}

⑹ Java編程自動取款機步驟

Java編寫的模擬ATM取款機程序/*** @version 1.0
* @author Devil_Angel
* 該程序的功能為實現模擬銀行ATM自動取款機提款,查詢等功能.
*
*/import java.io.*;/*該類為實現客戶信息及部分功能*/
class Account {
private String code =null; //信用卡號
private String name =null; //客戶姓名
private String password=null; //客戶密碼
private double money =0.0; //卡里金額

/********************/
public Account(String code,String name,String password,double money)
{
this.code=code;
this.name=name;
this.password=password;
this.money=money;
}

protected String get_Code() {
return code;
}

protected String get_Name() {
return name;
}

protected String get_Password() {
return password;
}

public double get_Money() {
return money;
}

/*得到剩餘的錢的數目*/
protected void set_Balance(double mon) {
money -= mon;
}
}/**********實現具體取款機功能*********/
class ATM {
Account act;
// private String name;
// private String pwd;

public ATM() {
act=new Account("000000","Devil","123456",50000);
}

/***********歡迎界面***********/
protected void Welcome()
{
String str="---------------------------------";
System.out.print(str+"\n"+
"歡迎使用Angel模擬自動取款機程序.\n"+str+"\n");
System.out.print(" 1.>取款."+"\n"+
" 2.>查詢信息."+"\n"+
" 3.>密碼設置."+"\n"+
" 4.>退出系統."+"\n");
}

/**********登陸系統**********/
protected void Load_Sys() throws Exception
{
String card,pwd;
int counter=0;

BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
do {
System.out.println("請輸入您的信用卡號:");
card=br.readLine();
System.out.println("請輸入您的密碼:");
pwd=br.readLine();

if(!isRight(card,pwd))
{
System.out.println("您的卡號或密碼輸入有誤.");
counter++;
}
else
SysOpter();

}while(counter<3);
Lock_Sys();
}

/**********系統操作**********/
protected void SysOpter() throws Exception
{
int num;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.println("請選擇您要操作的項目(1-4):");
num=br.read(); //num為ASICC碼轉換的整數
switch(num) {
case 49: BetBalance(); break;
case 50: Inqu_Info(); break;
case 51: Set_Password(); break;
case 52: Exit_Sys(); break;
}
System.exit(1);
}

/**********信息查詢**********/
protected void Inqu_Info() {
System.out.print("---------------------\n"+
act.get_Code()+"\n"+
act.get_Name()+"\n"+
act.get_Money()+"\n"+
"-----------------------");
}

/**********取款**********/
public void BetBalance() throws Exception
{
String str=null,str1;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
do {
System.out.println("請輸入您要取的數目:");
str=br.readLine();
str1=String.valueOf(act.get_Money());
if(str.compareTo(str1)>0) {
System.out.println("超過已有的錢數,請重新輸入您要取的數目:");
}
else {
/*操作成功*/
// act.set_Balance(str);
System.out.println("取款成功,請收好您的錢.");
Welcome();
SysOpter();
}
}while(true);

}

/**********判斷卡內是否有錢**********/
protected boolean isBalance() {
if(act.get_Money()<0) {
// System.out.println("對不起,您的錢數不夠或卡已透支.");
return false;
}
return true;
}

/********卡號密碼是否正確******/
protected boolean isRight(String card,String pwd)
{
if(act.get_Code().equals(card) && act.get_Password().equals(pwd))
return true;
else
return false;
}

/**********密碼修改**********/
protected void Set_Password() throws Exception
{
String pwd=null;
int counter=0;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
do {
System.out.println("請輸入舊密碼:");
pwd=br.readLine();
if(act.get_Password().equals(pwd))
{
do {
System.out.println("請輸入新密碼:");
String pwd1=br.readLine();
System.out.println("請再次輸入新密碼:");
String pwd2=br.readLine();
if(!pwd1.equals(pwd2))
{
System.out.println("兩次輸入不一致,請再次輸入.");
}
else
{
System.out.println("密碼修改成功,請使用新密碼.");
Welcome();
SysOpter();
}
}while(true);
}
}while(counter>3);

}

/**********鎖定機器**********/
protected void Lock_Sys() {
System.out.println("對不起,您的操作有誤,卡已被沒收.");
System.exit(1);
}

/**********結束系統**********/
protected void Exit_Sys() {
System.out.println("感謝您使用本系統,歡迎下次在來,再見!");
System.exit(1);
}

}public class Text
{
public static void main(String[] args) throws Exception
{
ATM atm=new ATM();
atm.Welcome();
atm.Load_Sys();
// atm.Exit_Sys();
}
} //模擬ATM取款機工作流程 import java.util.Scanner;public class Atm {
public Atm() {
}
public static void main(String[] args) {
// TODO code application logic here
Scanner sc = new Scanner(System.in);
int password = 0;
int count = 0;
int choice = 0;
int type = 0;
int input = 0;
int acount = 1000;
boolean exit = false;
int flag = 0;

do{
System.out.println("請輸入您的密碼:");
password = sc.nextInt();
count++;
}while(password != 12345 && count<3);
if(password == 12345){
//密碼正確繼續後面的操作。
do{
System.out.println("請選擇您的操作,1.查詢 2.取款");
choice = sc.nextInt();
switch(choice){
case 1:
do{
System.out.println("請選擇帳戶類型:1. 美元 2. 人民幣");
type = sc.nextInt();
if(type == 1){
System.out.println("You have $"+acount+"!");
}else if(type == 2){
System.out.println("您有"+acount+"圓!");
}else{
System.out.println("類型選擇錯誤,請重新選擇!");
}
System.out.println("1.繼續 2.離開");
flag = sc.nextInt();
if(flag == 1){
exit = false;
}else{
exit = true;
}
}while(type!=1 && type!=2);
break;
case 2: do{
System.out.println("請選擇帳戶類型:1. 美元 2. 人民幣");
if(type == 1){
System.out.println("Please input number of your money!");
input = sc.nextInt();
if(input > acount){
System.out.println("You have not enough money!");
}else{
System.out.println("You take care of your money!");
}
System.out.println("1.continue 2.exit");
flag = sc.nextInt();
if(flag == 1){
exit = false;
}else{
exit = true;
}
}else if(type == 2){
System.out.println("請輸入您要取的金額!");
input = sc.nextInt();
if(input > acount){
System.out.println("您的余額不足!");
}else{
System.out.println("請妥善保管您的錢!");
acount = acount - input;
}
System.out.println("1.繼續 2.離開");
flag = sc.nextInt();
if(flag == 1){
exit = false;
}else{
exit = true;
}
}else{
System.out.println("類型選擇錯誤,請重新選擇!");
}

}while(type!=1 && type!=2);
break;
default: System.out.println("類型選擇錯誤,請重新選擇!");
}
}while(choice!=1 && choice!=2 || exit == false);
}else{
//密碼錯誤,退出。
System.out.println("三次密碼錯誤,吞卡!");
}
}
}

⑺ 求Java代碼 模擬簡易atm機

參考了別人的代碼。略作修改,已經很簡單了:

InfoATM.java:

publicclassInfoATM{

doublemoney=0;

publicInfoATM(doublecash){
super();
this.money=cash;
}
//存款的方法
publicvoidsave(doublecount){
money+=count;
}

//取款的方法
publicvoiddraw(doublecount){
money-=count;
}
publicdoublegetMoney(){
returnmoney;
}
publicvoidsetMoney(doublemoney){
this.money=money;
}

}

TestATM.java:

importjava.awt.BorderLayout;
importjava.awt.GridLayout;
importjava.awt.event.ActionEvent;
importjava.awt.event.ActionListener;

importjavax.swing.JButton;
importjavax.swing.JFrame;
importjavax.swing.JLabel;
importjavax.swing.JPanel;
importjavax.swing.JTextField;

{

=2531222181184935595L;
//主面板pnBasic是用來裝pnDate和標簽文字的。
privateJPanelpnBasic;
//添加到主面板中的中間pnDate面板是為了裝表單的。
privateJPanelpnDate;
//添加到主面板中的北邊pnLabel面板是為了裝歡迎詞的
privateJPanelpnLabel;
InfoATMatm=newInfoATM(0);

publicTestATM(){

pnBasic=newJPanel();
//主面板pnBasic是用來裝pnDate和標簽文字的。
pnDate=newJPanel(newGridLayout(2,2));
//pnDate面板是為了裝表單的。
pnLabel=newJPanel();

JLabeltop=newJLabel("歡迎來到中國銀行!");
pnLabel.add(top);
//先將數值添加在一個容器中並設置其在容器的右邊,在將容器添加在網格的第一格
JPaneljp1=newJPanel();

JLabelnumber=newJLabel("數值:");
finalJTextFieldbox=newJTextField(5);

jp1.add(number);
jp1.add(box);

JPaneljp2=newJPanel();
JButtoncreate=newJButton("新建銀行賬戶");
jp2.add(create);
JButtontake=newJButton("取款");
JButtonin=newJButton("存款");

pnDate.add(jp1);
pnDate.add(jp2);
pnDate.add(take);
pnDate.add(in);

//加一句下面的就好了
JPaneljpS=newJPanel();
finalJLabeltotal=newJLabel("您現在的賬戶余額是:0元");
jpS.add(total);

pnBasic.setLayout(newBorderLayout());

pnBasic.add(pnLabel,BorderLayout.NORTH);
pnBasic.add(pnDate,BorderLayout.CENTER);
pnBasic.add(jpS,BorderLayout.SOUTH);

setContentPane(pnBasic);
setBounds(400,250,500,500);
pack();
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
pack();

in.addActionListener(newActionListener(){
publicvoidactionPerformed(ActionEvente){
if(box.getText()!=null&&box.getText()!=""){
try{
doublecount=Double.parseDouble(box.getText());
if(count>0){
atm.save(count);
total.setText("您現在的賬戶余額是:"+atm.getMoney()+"元");
box.setText("");
}
}catch(Exceptione1){
System.out.println("您輸入的數值必須是數字");
}

}
}
});

take.addActionListener(newActionListener(){
publicvoidactionPerformed(ActionEvente){
if(box.getText()!=null&&box.getText()!=""){
try{
doublecount=Double.parseDouble(box.getText());
if(count>=0&&count<=atm.getMoney()){
atm.draw(count);
total.setText("您現在的賬戶余額是:"+atm.getMoney()+"元");
box.setText("");
}else{
System.out.println("你的余額不足,取款失敗");
}
}catch(Exceptione1){
System.out.println("您輸入的數值必須是數字");
}
}
}
});

create.addActionListener(newActionListener(){
publicvoidactionPerformed(ActionEvente){
total.setText("您現在的賬戶余額是:0元");
atm.setMoney(0);
box.setText("");
}
});

}

publicstaticvoidmain(String[]args){
newTestATM();

}
}

⑻ 如何用Java編寫模擬ATM取款機的程序

import java.io.IOException;

/**
* ATM機類
*
* 查看余額
*
* 取款
*
* 存款
*
* 退出系統
*
*
*
*/

public class ATM {
static double yue = 1200.00;

public static void main(String[] arg) {
ATM localTest1 = new ATM();
localTest1.ATM_Operate();
}

/**
* ATM機的操作
*/
private void ATM_Operate() {
System.out.println("歡迎使用中國工商銀行ATM取款機");
System.out.println("1、查看余額 2、取款");
System.out.println("3、存款 0、退出");
System.out.print("請輸入您需要的服務:");
byte[] buffer = new byte[512];
try {
int count = System.in.read(buffer);// 返回實際讀取的位元組數
System.out.print("您輸入的是:");
for (int i = 0; i < count; i++) {
System.out.print("" + (char) buffer[i]);
}
if ((char) buffer[0] == '1') {
// 查看余額
System.out.println("您的余額是:¥" + yue + "元");
System.out.println();
ATM_Operate();
} else if ((char) buffer[0] == '2') {
// 取款
withdrawal();
System.out.println();
ATM_Operate();
} else if ((char) buffer[0] == '3') {
// 存款
deposit();
System.out.println();
ATM_Operate();
} else if ((char) buffer[0] == '0') {
// 退出
System.out.println("您已經成功退出系統,謝謝你的使用");
System.exit(0);
} else {
System.out.println("輸入不合法,請重新輸入");
System.out.println();
ATM_Operate();
}

} catch (IOException e) {
e.printStackTrace();
}
}

/**
* 取款
*
* @throws IOException
*/
private void withdrawal() throws IOException {
byte[] buffer = new byte[512];

System.out.print("請輸入您要取出的金額:¥");
int count2 = System.in.read(buffer);// 返回實際讀取的位元組數
System.out.print("您輸入的金額是:");
for (int i = 0; i < count2 - 1; i++) {
System.out.print("" + (char) buffer[i]);
}
System.out.println();
// 字元0 ~ 9對應ASCII值48 ~ 57
boolean flag = false;
for (int i = 0; i < count2 - 1; i++) {
if ((char) buffer[i] > 47 && (char) buffer[i] < 58) {
if (i == count2 - 2) {
flag = true;
}
} else {
// 輸入的字元不是數值
System.out.println("輸入不合法,請重新輸入");
withdrawal();
break;
}
}
System.out.println();
if (flag) {
System.out.print("您已成功取出¥:");
String num = "";
for (int i = 0; i < count2 - 1; i++) {
System.out.print("" + (char) buffer[i]);
num += (char) buffer[i];
}
yue -= Double.valueOf(num);
System.out.print(",現在余額¥:" + yue);

}
}

/**
* 存款
*
* @throws IOException
*/
private void deposit() throws IOException {
byte[] buffer = new byte[512];

System.out.print("請輸入您要存入的金額:¥");
int count2 = System.in.read(buffer);// 返回實際讀取的位元組數
System.out.print("您輸入的金額是:");
for (int i = 0; i < count2 - 1; i++) {
System.out.print("" + (char) buffer[i]);
}
System.out.println();
// 字元0 ~ 9對應ASCII值48 ~ 57
boolean flag = false;
for (int i = 0; i < count2 - 1; i++) {
if ((char) buffer[i] > 47 && (char) buffer[i] < 58) {
if (i == count2 - 2) {
flag = true;
}
} else {
// 輸入的字元不是數值
System.out.println("輸入不合法,請重新輸入");
withdrawal();
break;
}
}
System.out.println();
if (flag) {
System.out.print("您已成功存入¥:");
String num = "";
for (int i = 0; i < count2 - 1; i++) {
System.out.print("" + (char) buffer[i]);
num += (char) buffer[i];
}
yue += Double.valueOf(num);
System.out.print(",現在余額¥:" + yue);

}
}
}

熱點內容
編譯歷史 發布:2025-07-04 18:23:01 瀏覽:850
空調壓縮機種類 發布:2025-07-04 18:13:58 瀏覽:242
中國有ip6伺服器嗎 發布:2025-07-04 17:58:56 瀏覽:725
第六章編譯原理答案 發布:2025-07-04 17:37:55 瀏覽:40
php內存優化 發布:2025-07-04 17:25:54 瀏覽:664
威綸觸摸屏如何設置時間限制密碼 發布:2025-07-04 17:25:50 瀏覽:418
python列表的遍歷 發布:2025-07-04 17:24:20 瀏覽:24
編譯基本塊 發布:2025-07-04 17:23:06 瀏覽:750
scl語言編程 發布:2025-07-04 17:23:05 瀏覽:993
oracle用戶連接資料庫連接 發布:2025-07-04 17:20:20 瀏覽:939