عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
قديم 16-04-2013, 10:00 PM   #1059

بنفسي اصنع سعادتي

جامعي

الصورة الرمزية بنفسي اصنع سعادتي

 
تاريخ التسجيل: Nov 2010
كلية: كلية الاقتصاد والادارة
التخصص: علوم إدارية
نوع الدراسة: إنتساب
المستوى: متخرج
البلد: جــــدة
الجنس: أنثى
المشاركات: 153
افتراضي رد: [cpcs 202 - برمجة 1] لديك سؤال , شيء غير مفهوم ,,, تفضل هنا , موضوع مفيد

لو سمحت أخوي ساعدني في حل البورجيكت 0

لاني حاولت احلو م قدرت الرن م يزبط معي 0

هذا هوا حلي الله يسعدك ساعدني في اقرب وقت ممكن 0



package porject2;
import java.util.Scanner;
/
*
* @author LENOVO
*/
public class Porject2 {

/
* @param args the command line arguments
*/
public static void main(String[] args) {
char A = 0;
double wit=0 ;
double dis =0 ;
double co=0 ;
double price=0 ;
double all=0 ;
String str = null;

Scanner input = new Scanner(System.in);
System.out.println( " Welcome to Shipping System \n \n Press S for shipping in Saudi Arabia \n Press G for shipping to Gulf countries \n Press O for shipping to other countries");
A = (char) input.nextInt ();
A=str.charAt(0);
if((A=='S')||(A=='G')||(A=='O'))
{
System.out.println (" Welcome to Shipping System \n \n Enter the weight:");
wit=Integer.parseInt(str);
if(wit>0&&wit<=50)
{if(wit>0&&wit<=2)
co=wit*0.25;
if(wit>2&&wit<=10)
co=wit*0.2;
if(wit>10&&wit<=20)
co=wit*0.15;
if(wit>20&&wit<=50)
co=wit*0.2;

System.out.println("Welcome to Shipping System \n\n Enter the distance:");

dis=Integer.parseInt(str);
if(dis>=10&&dis<=5000)
{
price=co*dis;
}
else
{
System.out.println("Welcome to Shipping System \n\n the distaenc must not exceed 5000 KM");
}
}
else
{ System.out.println(" Welcome to Shipping System \n\n the weight must not exceed from 0 to 50KG!" );
}
}
else
{
System.out.println("Welcome to Shipping System \n\n Wrong selection");
}
if(A=='G')
price=price+(price*0.02);
if(A=='O')
price=price+(price*0.05);
if(price>0&&price<=1000)
{
all=price;
System.out.println("Welcome to Shipping System \n\n Discount is 0% The Charge of Your" +wit+" KG Cargo will be "+all+" SR");
}
else if (price>100 && price<10000)
{
all=price-(price*0.05);
System.out.println("Welcome to Shipping System \n\n Discount is 5% The Charge of Your "+wit+ "KG Cargo will be"+all+"SR");
}
else if(price>=10000)
{
all=price-(price*0.1);
System.out.println("Welcome to Shipping System \n Discount is 10% The Charge of Your "+wit+" KG Cargo will be "+all+" SR");
}
}
// TODO code application logic here
}

 

بنفسي اصنع سعادتي غير متواجد حالياً   رد مع اقتباس