.If you started a business in which you earned Rs.1 on the first day, Rs.3 on the second day,Rs.5 on the third day, Rs.7 on the fourth day, & so on. How much would you have earned with this business after 50 years (assuming there are exactly 365 days in every year)?

Showing Answers 1 - 10 of 10 Answers

y

  • Oct 17th, 2006
 

after 50 years earned 36501.

  Was this answer useful?  Yes

bhargav

  • Nov 27th, 2006
 

  we can write pl/sql block using for loop

DECLARE
       RESULT NUMBER:=1;
 INC NUMBER:=2;
BEGIN
 FOR I IN 1..365 LOOP
 RESULT:=RESULT+INC;
 END LOOP;
                DBMS_OUTPUT.PUT_LINE(RESULT);
END;
/

/

  Was this answer useful?  Yes

Srinivasa Pavan

  • Jan 9th, 2007
 

hai
all
am a new to this site and i can give a solution to this Question and here is the coding for that.
declare
result number :=1;
inc number ?:=2;
year number :=1;
i number;
begin
while??(?year?<=50?)?loop
for i ??in 1..365 loop
result :=result+inc;
end loop ;
year :=year +1;
end loop;
dbms_output.put_line("Value after 50 years is :",result);
end ;
/
Just Try this and let me know
if there r any mistakes kindly excuse and let me know
with Regards ======================Srinivasa Pavan K

  Was this answer useful?  Yes

create proc EarnMoneyProc
as
declare @earn int,@total int,@tempday int,@TotDays int

set @earn=1
set @tempday=1
set @total=0
set @Totdays = 50*365
print @Totdays
while(@tempday <= @Totdays  )
begin
set @earn = @earn + 2;set @tempday =@tempday+1
print @earn
end
print @total

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions