Showing posts with label Addition of Two Numbers. Show all posts
Showing posts with label Addition of Two Numbers. Show all posts

Saturday, February 27, 2016

Addition of Two Numbers

 Addition of Two Numbers
  declare
  a number;
  b number;
  c number;
  begin
  a:= &a;
  b:= &b;
  c:= a+b;
  dbms_output.put_line('Sum of '|| a ||' and  ' || b ||' is ' || c);
 10* end;

SQL> /
Enter value for a: 20
old   a:= &a;
new   a:= 20;
Enter value for b: 30
old   b:= &b;
new   b:= 30;


Sum of 20 and 30 is 50