+ 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

22nd Sep 2018, 3:20 PM
ANKIT BOSS
ANKIT BOSS - avatar
5 ответов
+ 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
22nd Sep 2018, 4:10 PM
Julian
Julian - avatar
+ 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
22nd Sep 2018, 4:25 PM
Julian
Julian - avatar
+ 2
can you explain while conditions and one state of the heart and next state
22nd Sep 2018, 4:15 PM
ANKIT BOSS
ANKIT BOSS - avatar
+ 2
i learned c++ but i can not write program. i can't think how do work it please suggest me....
22nd Sep 2018, 4:22 PM
ANKIT BOSS
ANKIT BOSS - avatar
+ 2
IT GOES FROM ONE HAND ABOVE...FROM ME
22nd Sep 2018, 4:58 PM
Aditya Sharma
Aditya Sharma - avatar