0% found this document useful (0 votes)
2 views3 pages

To 1

The document is a Java program that implements a simple command-line application for user login and various functionalities based on user input. It prompts the user for an email and password, and if the credentials match predefined values, it presents a menu with options such as calculating money, finding the largest number, and calculating area. The program includes basic error handling and outputs results based on user selections.

Uploaded by

ameennoman777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

To 1

The document is a Java program that implements a simple command-line application for user login and various functionalities based on user input. It prompts the user for an email and password, and if the credentials match predefined values, it presents a menu with options such as calculating money, finding the largest number, and calculating area. The program includes basic error handling and outputs results based on user selections.

Uploaded by

ameennoman777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

/*

* To change this template, choose Tools | Templates


* and open the template in the editor.
*/

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner in=new Scanner(System.in);

String email="mosalah";
String pass="1234";
System.out.println("entr your email");
String email1=in.next();
System.out.println("entr your password");
String passs=in.next();
if(email.equals(email1)&&pass.equals(passs)){
System.out.println("1_about as\n2_calculatr\n3_find the larges
t unm\n4_convert NDDN\n5_convertHWDH\n6_calcuter the area\n7_calcuter y");
System.out.println("‫;)"اختررقم للدخول الى احد المليات‬

byte choos=in.nextByte();
switch(choos){
case 1:
String Name=" ";
String qessm=" ";
byte num=4;
String info=Name+" "+qessm+" "+num;
System.out.println("info:"+info);
break;
case 2:
System.out.println("entr your mony");
double mony=in.nextDouble();
System.out.println("entr your apsent day");
int days=in.nextInt();
double day=(mony/30);
double sum=days*day;
System.out.println("entr yuor hour");
int hour=in.nextInt();
int hours=hour*1200;
double hous=mony*0.25;
double bus=mony*0.12;
double mult=mony*0.07;
double totel=mony+(hours+hous+bus)-(mult-sum);
System.out.println("fainal mony:"+totel);
break;

case 3:
System.out.println("entr num1");
int n1=in.nextInt();
System.out.println("entr num2");
int n2=in.nextInt();
System.out.println("entr num3");
int n3=in.nextInt();
int max=n1;
if(n2>=max){
max=n2;
}if(n3>=max){
max=n3;
}else{
System.out.println("eroor");}
System.out.println("the big num is="+max);

case 4:

int x=6;
int y=9;
int area=x*y;
int m=(x+y)*2;
System.out.println("area="+area);
System.out.println("‫"المحيط يساوي‬+m);
break;

case 0:
System.exit(0);

break;

default:
System.out.println("invlid selection numper");
}

}else{
System.out.println("error in lonig");
}

}
}

You might also like