15,918,808 members
1.00/5 (1 vote)
See more:
hello,,

Write a PL/SQL block to display the multiples of a Given Number without including multiples of 10 for a given range (Start Value and End Value), using GOTO.

Note: The user will input the values for Start value, end value and Given Number

Example :

Start value: 1
End Value: 100
Given Number: 5
5
15
20
..
100

i tried to solve it .. but i couldn't get the correct answer.
Posted
DamithSL 1-Jun-15 14:18pm
can you update the question with the script you tried?

## Solution 1

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!

Member 11193774 5-Jun-15 13:57pm
actually ,, i tried to solve it ,, but really i couldn't get the solution :'(
this is my solution :
declare
start_value number; end_value number; n number;
result;
begin
start_value:=&start_value;
end_value:=&end_value;
n :=&n;
for x in start_value..end_value loop
<<calc>>
if((x mod n)=0 and (x mod 10)!=0) then
dbms_output.put_line(x);
end if;
goto calc;
end loop;
end;
/