الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

لو سمحتوا .. اريد مساعده

مغلق
بدأه dr.7r في 28 مايو 2007 · 5 رد · 489 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم ورحمة الله وبركاته

اخواني واخواتي

كيف الحال؟

لو سمحتوا يا خبراء الجافا..

اريد مساعدتكم في برنامج jGRASP

:wacko:

احتاج مساعده لبرمجة هالبرنامجين؟

البرنامج الاول:

Write a program that reads a list of integers from the keyboard and creates the following information:

a) Finds and displays the sum and the average of these integers.

B) Finds and displays the largest and the before largest integer of these integers.

c) Finds and displays the smallest and the before smallest integer of these integers .

d) Displays YES if all of these integers are between 10 and 90 and NO if not.

e) Displays YES if some of these integers are less than 20 and NO if not.

The input data consist of a list of integers with a sentinel (9999). The program must ask the user to enter the integers, one by one, and enter the sentinel when the end of the list has been reached.

Use methods to perform each task.

The output should appear as follows:

The sum of all these numbers is : -------

The average of all these numbers is : -------

The largest number is -------- and the before largest number is --------

The smallest number is -------- and the before smallest number is --------

All these numbers are between 10 and 90 : ---------------

Some of these numbers are less than 20 : ---------------

والبرنامج الثاني

The greatest common divisor (GCD) of two integers is the largest integer that evenly divides into each of the two integers. For example:

The greatest common divisor of 6 and 8 is 2.

The greatest common divisor of 789 and 4 is 1.

The greatest common divisor of 9999 and 27 is 9.

The greatest common divisor of 99 and 11 is 11.

Write a program that returns the greatest common divisor of two integers.

واتمنا الرد في اقرب وقت ممكن

احترامي لكم جميعا ً

..

#2

عزيزي بما أن هذه أول مشاركة لك بالمنتدى ..

أسألك بـ 5 دقائق من وقتك فقط إذا سمحت لنا بقراءة

ضوابط الكتابة بالمنتدى .

أنا جديد على الموضوع .

ممكن الرابط هذا يفيدك

#3

عزيزي .. IGBSpeed

شكرا ً لك على الطريقه الجميله في الرد .. وبصراحه ان ردك الطيب عباره عن جواب للسؤال الذي طلبته

على كل حال .. فانا آسف لما بدر مني من تقصير .. وألتمسكم عذراً اخواني واخواتي

..واتمنا ان القى ردا ً أخرا ً مفيدا ً

احترامي وتقديري

..

#4

لا يوجد اي شخص يريد المساعده!!

شكرا ً لكم

#5

اكتب محاولتك ...

#6

أخي .. عيسى عايد العنزي

هذه محاولتي في البرنامج الاول.

ولكن أنا متأكد بأنها تحتوي على أخطاء

import java.util.*;

public class assighnment3

{

static Scanner console=new Scanner(System.in);

public static void main(String[]arges)

{

int c,z,a;

int x=0;

System.out.println("enter two integer number to know the greatest common divisor");

z=console.nextInt();

a=console.nextInt();

if (z>a)

{

for(c=1;c<=z;c++)

if(z%c==0&&a%c==0)

x=c;

}

else

if (a>z)

for(c=1;c<=a;c++)

if(a%c==0&&z%c==0)

x=c;

System.out.println(" the greatest common vivisior of "+z+" and "+a+" is "+x);

}

}

هذا الموضوع مغلق.

مواضيع مشابهة