java編寫輸出學(xué)生姓名 1.定義一個結(jié)構(gòu)體變量,起成員項包括員工號,姓名,工齡,工資,輸入所需的具體數(shù)據(jù),然后輸出?
1.定義一個結(jié)構(gòu)體變量,起成員項包括員工號,姓名,工齡,工資,輸入所需的具體數(shù)據(jù),然后輸出?用Java編寫,相對簡單,定義一個employee對象。public class person{int nu
1.定義一個結(jié)構(gòu)體變量,起成員項包括員工號,姓名,工齡,工資,輸入所需的具體數(shù)據(jù),然后輸出?
用Java編寫,相對簡單,定義一個employee對象。
public class person{
int number
String name
雙薪,
int workYears
public static void main(String args[]){
person p=new petson()
scanner sc=new scanner(系統(tǒng)輸入)
系統(tǒng)輸出打?。ā闭堓斎雴T工編號、姓名,工資和工齡順序“
p.number=sc.nextInt公司()
p.name=sc.nextString公司()
p.salary=nextDouble()
p.workYears=nextInt()系統(tǒng)輸出打?。ā皢T工信息如下,員工編號:”p.number“,姓名:”p.name“,工資:”p.salary“,工齡:”p.workyears)]}