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

مساعدة ضروري اليوم

بدأه khaled1122 في 2 نوفمبر 2012 · 1 رد · 287 مشاهدة · في JavaSE
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

ابي طريقة حل هذي الاسئله

Write a java program to read an angle value d in degrees, then it:

a. Prints the equivalant radian value r

b. Prints the values of sin® and cos®

c. Prints the values of log(d) and d5

Example:

Reference: http://download.oracle.com/javase/6/docs/api/java/lang/Math.html

Please enter an angle value (in degrees): 227

The equivalent radian value: 3.961897402027128

sin(3.961897402027128) = -0.7313537016191705

cos(3.961897402027128) = -0.6819983600624986

log(227) = 5.424950017481403

227^5 = 6.02738989907E11

ــــــــــــــــــــــــــــــــــــــــــ

Write a java program to read a non-integer from the keyboard, then use a wrapper class Double to do the following:

a. Show the hexadecimal string representation of the number

b. Convert the number to the primitive type float

c. Convert the number to the primitive type long

Example:

Reference: http://download.oracle.com/javase/6/docs/api/java/lang/Double.html

Please enter a non-integer: 227.5332

Hexadecimal value: 0x1.c710ff9724745p7

Float value: 227.5332

Long value: 227

ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ

Write a java program to replace double spaces with a single space in a string S that is entered by the user.

Example:

Reference:

Refer to the following page to learn what methods are offered by the String class. Use whatever method(s) you think will help in solving the problem: http://download.oracle.com/javase/6/docs/api/java/lang/String.html

Please enter a sentence:

The quick brown fox jumps over the lazy dog

Result:

The quick brown fox jumps over the lazy dog

#2

خلاص يا شباب عرفت احلهم

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