الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How I Can Do This Functions

Featured Replies

بتاريخ:

Creat a function that takes a number as its input, and returns a sum, which is defined as follows:
If the input is positive, for example, 10, the returned sum should be:
1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55.
- If the input is negative, for example, -10, the returned sum should be:
-10 -9 - 8 - 7 -6 - 5 - 4 - 3 - 2 - 1 = -55.
You need to create two versions of the function. One is implemented in NUMBER datatype and the other
in BINARY INTEGER.
Once these two functions are created, you need to create a testing procedure in which the execution speed
of the two sum functions are compared. The testing procedure should have a similar output as the one
shown below:
bSum(40000) = 800020000
Time used in running bSum(10000): 5 miliseconds
nSum(40000) = 800020000
Time used in running nSum(10000): 20 miliseconds
where bSum and nSum are the names of the sum function implemented in BINARY INTEGER and NUMBER
respectively. In implementing the testing function, you may need to use TIMESTAMP, SYSTIMESTAMP,
INTERVAL DAY TO SECOND, and EXTRACT to get the needed information for output.

تم تعديل بواسطة free2000000

بتاريخ:
  • كاتب الموضوع

I get an answer I’ll uploaded in a few days
Thank you guys

بتاريخ:

create function fn1 is (input_p number,output_p out number)
begin declare
sm_val number:=0;
begin if input_p >0 then 
for i in 1..input_p
loop
sm_val :=sm_val +i;
end loop;
elsif input_p<0 then 
for i in input_p..-1 
loop
 sm_val :=sm_val +i;
end loop;
end if;
end;
end;




ده إن اشاء يكون مفتاح للاجابه ابا بخصوص وقت تنفيذ عمليه الجمع تقوم بقراءه الوقت الحالى للجهاز وبعد الانتهاء تقوم بنفس الموضوع وتاتى بالفرق سيكون هو الوقت المستغرق تقريبا

تم تعديل بواسطة amr fawzy

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.