السلام عليكم ورحمة الله وبركاته
اخواني واخواتي
كيف الحال؟
لو سمحتوا يا خبراء الجافا..
اريد مساعدتكم في برنامج 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.
واتمنا الرد في اقرب وقت ممكن
احترامي لكم جميعا ً
..