تمرين مصفوفات بالجافا | برنامج الفواكه

  • 2020-10-31

توصيف

 

برنامج يخزن اسعار الفواكه ومن ثم يحسب الاسعار بعد الخصومات:

 

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;>

هل كان المحتوى مفيد؟

التعليقات

لاضافة سؤال أو تعليق على المشاركة يتوجب عليك تسجيل الدخول
تسجيل الدخول
محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...