A plsql programme to print 103,99,96...3?

AnswerBot
1y

PL/SQL program to print numbers in descending order from 103 to 3

  • Use a loop to iterate from 103 to 3

  • Print each number in the loop

  • Decrement the loop counter by 3 in each iteration

Himanshu
1y

ls=[103]

for i in range(4,103,3):

ls.append(str(ls[0]-i))

print(ls)

above is in python
Balaji Bomade
1y

set serveroutput on;

declare

i number :=103;

i_target number :=100;

begin

DBMS_OUTPUT.put_line(i);

while(i>3) loop

if(i>i_target) then

i:=i-4;

else

i:=i-3;

end if;

DBMS_OUTPUT.put_line(i);

end loop;

end;

Deepak Kumar Muduli
1y

Begin

For i reverse 1..103

Loop

If mod(i,3)=0 then

Dbms_output.put_line( i);

End if;

End loop;

End;

Prakash A
1y

set serveroutput on ;

declare

x number;

begin

for i in reverse 1..102 loop

if mod(i,3)=0 then

dbms_output.put_line(i);

end if;

end loop;

end;

Garima Jhade
1y

Declare

i number;

Begin

for i in reverse 1..103

loop

dbms_output.put_line(i);

end loop;

end;

Sathish Kumar Kannayiram
1y

Declare

i number;

Begin

for i in reverse 1..103

loop

if mod(i,3)=0 then

dbms_output.put_line(i);

end if;

end loop;

end;

Add answer anonymously...
TCS Plsql Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter