19-10-2011, 07:07 AM
|
#7
|
تاريخ التسجيل: Mar 2011
التخصص: فريندس ناو , اوذرز نت ماتر ^.*
نوع الدراسة: ثانوي
المستوى: الخامس
الجنس: أنثى
المشاركات: 938
|
رد: مساعدة في سؤال cpcs202
كود:
package rate;
import java.util.Scanner;
public class Rate {
/
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
double rate, subtotal,gratuity,total;
Scanner keyboard= new Scanner(System.in);
System.out.println("Enter subtotal \n");
subtotal=keyboard.nextDouble();
System.out.println(" Enter the rate as fraction ");
rate=keyboard.nextDouble();
gratuity=rate*subtotal;
total=subtotal +gratuity;
System.out.println(" If you have "+subtotal+ " as subtotal and "+ rate+ "as rate Then \n the gratuity is \n " +gratuity+" and Total Is\n "+ total );
}
}
اللهم لك الحمد م توقعت تجي معايا ,,
ي رب تمم فرحتي بباقي الاوامر ,,
موفقين كلنا ان شاء الله ,,
|
|
اللهم باآآآآآآآآآرك لنا في شآآآمنا و يمنناآآ !!
|
|
|
|