+ 2
I want to create a throbbing heart program in c++ and html language.
Guide me and i want to learn more,If you guide me, then I can learn more
5 Antworten
+ 2
in html, you can draw the heart with divs and css, and the throbbing with css animations.
in c++ you can create a while loop which outputs one state of the heart, and the next time the loop is run, it outputs the second state of the heart, the next iteration it shows the first one etc. etc
+ 3
ANKIT BOSS
here is an example in python:
gamestate = 1
heartone1 = "0#0#0"
heartone2 = "#####"
heartone3 = "0###0"
heartone4 = "00#00"
hearttwo1 = "0##0##0"
hearttwo2 = "#######"
hearttwo3 = "0#####0"
hearttwo4 = "00###00"
hearttwo5 = "000#000"
while True:
if gamestate == 1:
print(heartone1, "\n", heartone2, "\n", heartone3, "\n", heartone4, "\n\n")
gamestate = 2
elif gamestate == 2:
print(hearttwo1, "\n", hearttwo2, "\n", hearttwo3, "\n", hearttwo4, "\n", hearttwo5, "\n\n")
gamestate = 1
sorry that it is in lython but i'm most familliar with it
+ 2
can you explain while conditions and one state of the heart and next state
+ 2
i learned c++ but i can not write program. i can't think how do work it please suggest me....
+ 2
IT GOES FROM ONE HAND ABOVE...FROM ME