Home > Back-end >  Help to tell me where I went wrong
Help to tell me where I went wrong

Time:10-18

Package Java. Util. Scanner;

Public class Lucky {
Public static void main (String [] args) {
Int custNo;
System. The out. Println (" please enter 4 member card number: ");
Scanner input=new Scanner (System. In);
CustNo=input. Nextln ();
System. The out. Println (" membership number is: "+ custNo);
Int gewei=custnNo % 10;
Int shiwei=custNo/10% 10;
Int baiwei=custNo/100% 10;
Int qianwei=custNo/1000;
System. The out. Println (" qian: "+ qianwei +" hundred: "+ baiwei + + shiwei" ten digits: "+" single digits: "+ gewei);
Int sum=gewei + shiwei, baiwei + qianwei;
System. The out. Println (" membership number "+" each sum of the: "+ + custNo sum);
If (sum> 20) {
System. Out.println (" membership number "+ custNo +" member, you have won! The prize is MP3!" );
System. The out. Println (" membership number "+ custNo +" member, you have no ");
}
}
}


}
  • Related