waleed hussain tumaihy
unknown
plain_text
3 years ago
1.9 kB
5
Indexable
package javaapplication8;
import javax.swing.JOptionPane;
public class JavaApplication8 {
public static void main(String[] args) {
String all_Info ;
double avrg=0.0,sum=0.0;
int m;
int b = 0;
int emp;
int b1;
emp=Integer.parseInt(JOptionPane.showInputDialog("عدد الموظفين"));
// do(){
int age[]=new int[emp];
for(int i=1; i<=5; i++){
age[i]=Integer.parseInt(JOptionPane.showInputDialog(" عمر الموظف هو"));
// if(age<18 ||age>59){
// JOptionPane.showMessageDialog(null,"حدث خطأ");
// }
JOptionPane.showMessageDialog(null, "اعمار الموظفين\n"+age);
//JOptionPane.showMessageDialog(null,"عمر الموظف رقم 1 هو"+age);
//JOptionPane.showMessageDialog(null,"عمر الموظف رقم 1 هو"+age);
avrg=sum/sum;
JOptionPane.showMessageDialog(null, "متوسط اعمار الموظفين"+sum/sum);
JOptionPane.showMessageDialog(null, "مجموع اعمار الموظفين"+age+age);
// int b1[]=new int[];
// for(int j=1; j<=5; j++){
// b1[j]=Integer.parseInt(JOptionPane.showInputDialog("ادارة رقم "));
int s;
//s=Integer.parseInt(JOptionPane.showMessageDialog(null, " تبقى له في الخدمة "));
}
switch (b){
case 1:
break;
case 2:
JOptionPane.showMessageDialog(null, "عدد الموظفين في الإدارة رقم 2 هو:"+emp);
break;
case 3:
break;
}
}
}
Editor is loading...