400 roses
my pangga gave me 400 roses today..
eto o.. =p
DECLARE @VAR AS INT, @FLAG AS INT, @POINT AS INT
DECLARE @SQL AS VARCHAR(8000)
DECLARE @SQL AS VARCHAR(8000)
SET @POINT = 20
SET @VAR = 1
SET @FLAG = 1
SET @SQL = 'SELECT SPACE(15) '
WHILE @VAR > 0
SET @VAR = 1
SET @FLAG = 1
SET @SQL = 'SELECT SPACE(15) '
WHILE @VAR > 0
BEGIN
SET @SQL = @SQL + ' UNION ALL SELECT STUFF(SPACE(15),10,' + CONVERT(VARCHAR(20),@VAR)
+ ',REPLICATE(''@};-'',' + CONVERT(VARCHAR(20),@VAR) + ')) + ''\ _ /___'''
IF @VAR >= @POINT
SET @FLAG = -1
SET @VAR = @VAR + @FLAG
END
EXEC (@SQL)
SET @SQL = @SQL + ' UNION ALL SELECT STUFF(SPACE(15),10,' + CONVERT(VARCHAR(20),@VAR)
+ ',REPLICATE(''@};-'',' + CONVERT(VARCHAR(20),@VAR) + ')) + ''\ _ /___'''
IF @VAR >= @POINT
SET @FLAG = -1
SET @VAR = @VAR + @FLAG
END
EXEC (@SQL)



13 Comments:
whew! whatever happened to the traditional roses? hehehe! syempre, i tried to figure it out, can he write it on C++ please? hehehe! cout, cout! =P
aaaawwww.. how sweet!! hehe now we really know that oneal and jane have had tooooo much coding already!! =P nevertheless, 400 roses is 400 roses. kahit virtual pa yan. haha! :D
and unlike harbie, hindi ko na inintindi. haha! basta sabi ni jane 400 daw.. tatanggapin ko na. i sooo hate coding talaga. much less figure it out =? teehee
hahaha! i tried but after reading through twice, i gave up. =P not my "language", literally. =P
i didnt run the code din naman to check if it's 400.. hehehe.. i trust that it is =D
kelan ko din lang naging language yan bengers.. ;) yakang yaka natin! =)
di ko nga alam kung anong language yan eh. =P
anyways, meron bang mahirap para sayo jane? di ka credible pagtanungan ng difficulty level eh. hehehe! =P
eto sya! :) sayang nag-wrap!
@};- \ _ /___
@};-@};- \ _ /___
@};-@};-@};- \ _ /___
@};-@};-@};-@};- \ _ /___
@};-@};-@};-@};-@};- \ _ /___
@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};-@};-\ _ /___
@};-@};-@};-@};-@};- \ _ /___
@};-@};-@};-@};- \ _ /___
@};-@};-@};- \ _ /___
@};-@};- \ _ /___
@};- \ _ /___
walang magawa pangs ko. hihihihi.
hahaha! *lol* at raymond... at least now we know it works. ;-P
aba!! 400 nga!! :D hehe
hahaha ... yan ang walang magawa! hehehe ... actually, pwede nyo baguhin yung dami ng roses ... palitan nyo lang yung value nung @POINT ... square nyo yung value nun, yun yung dami ng roses =) .. kung tama yung pagkakacompute ko .. hehe ...
aaayy. coding?! 'yaw na! :D hehe
ayawan na! coding na itu!
*walks out the room tagging furness along*
hehehe! ;-P
ano daw? l o l.
Post a Comment
<< Home