تمرين مصفوفات بالجافا | برنامج الفواكه
-
2020-01-14
- | softwareEngineer
- | مشاهدات: 3112
برنامج يخزن اسعار الفواكه ومن ثم يحسب الاسعار بعد الخصومات:
package javaapplication55;
import java.util.Scanner;
/**
*
* @author User
*/
public class JavaApplication55 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
double[] price=new double[4];
System.out.println("the price For 1 kg of 4 kinds of fruite:");
for (int i = 0; i < price price[i]=input.nextDouble(); index=input.nextInt(); weight=input.nextDouble(); offer_percentage=50; choice=input.nextInt(); xss=removed Total=0; Total=price*weight; Total=Total-(Total*offer)/100; Total=0; Total=price*weight;>
هذه المادة الدراسية هي ضمن مكتبة
مكتبة اكواد بلغة جافا java للمبتدئين
التعليقات
لا يوجد تعليقات
لاضافة سؤال او تعليق على المشاركة يتوجب عليك تسجيل الدخول
تسجيل الدخول
تسجيل الدخول