Help doing this homework please I already have the picture drawn in C Select one
ID: 1848032 • Letter: H
Question
Help doing this homework please I already have the picture drawn in C Select one of the objects in your drawing (i.e., if you had a house and a tree, pick the tree). In this assignment you will animate your drawing so that the selected object moves from point A to point B. The object you pick should contain at least two fundamental pieces (e.g., 2 circles or a triangle and a circle) Your program will read in an x0,y0 coordinate (for point A), the number of iterations you want to do, and the number of pixels your object should move in x and y each iteration (dx,dy). Your program should then loop through the bulk of your function (variable declartaions, graphics_init, and return statements should be outside of the loop). Each time through the loop you should redraw your picture, but with the selected item's location offset by dx,dy are values that are being stepped in your loop from x0,y0 to xf,yf. Your program should print out the values for x and y each time through the loop. When the loop is done, you program should sleep for 10 senconds. Submit 2 files to the drop box: you .c file; a screenshot showing the terminal window and your drawing. See the example screenshot to understand what is expected for prompt, inputs and outputsExplanation / Answer
help: #include #include #include #include main() { clrscr(); int driver,mode; driver = DETECT; initgraph(&driver,&mode,""); while (!kbhit()) { for (int i=1;i=1; i--) { circle(300,i,10); delay(10); cleardevice(); } } } C++ program to draw and move a circle on the screen (up and down). when hit any key from the keyboard circle will stop moving and program ends if you don't press any key from the keyboard circle will move on the screen infinite times. Here in this program kbhit() function is used. it checks for the keyboard keystroke.Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.