Oracle PL/SQL Programming

Monday, February 29, 2016

Sum of 10 numbers

set serveroutput on;
Declare
a number(4);
s number:=0;
Begin
a:=1;
loop
s:=s+a;
exit when(a=10);
a:=a+1;
end loop;
dbms_output.put_line('Sum of 10 numbers = '||s);
end;
/
Posted by Unknown at 9:37 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: Sum of 10 numbers

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2016 (25)
    • ►  March (6)
    • ▼  February (19)
      • cheack whether given number is palindrome or not.
      • Sum of n numbers
      • Fibonacci Series of N term
      • Sum of 10 numbers
      • Fibonacci series
      • Sum of 100 Numbers
      • Greatest of Three Numbers
      • Sum of Odd Numbers using for loop
      • Addition of Two Numbers
      • Locking of PL/SQL
      • VARIABLE DECLARATIONS
      • VARIABLES of PL/SQL
      • Types of constraints
      • Looping Statements / Iterative Statements:
      • Data Constraints
      • Count Prime 1 to 100 in PL/SQL Program
      • AirthematicOperation
      • DECISION STATEMENTS
      • Factorial

About Me

Unknown
View my complete profile
Simple theme. Powered by Blogger.