Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use C. Write a program that draws a picture of the Halloween pumpkin shown in the following. As in the house.c program shown in

Please use C. Write a program that draws a picture of the Halloween pumpkin shown in the following. As in the house.c program shown in Figure 7-7, your picture should be controlled by severalconstants: #define HeadRadius 1.0 #define StemWidth 0.1 #define stemHeight0.15 #define EyeWidth 0.3 #define EyeHeight0.2 #define Noseidth0.2 #deinfe NoseHeight0.2 #define NTeethPerRow 7 #define ToothWidth 0.083333 #define ToothHeight0.15

These values are the onesused to produce the pumpkin shown in the diagram, and you should be able to figure out what each constant means by looking at the picture. Your program must be written so that changing any of these constants changes the picture in the appropriate way. For example, if you change NTeethPerRow to 4, the new diagram should have only four teeth in each row, but the mouth should still be centered horizontally.The twoeyes and the mouthof thepumpkin faceshould be drawn halfway from the center to the edge of the circle in the appropriate direction, so that changing HeadRadius also changes the positions at which these features are drawn. The center of the circle representing the pumpkin should appear at the center of the screen. image text in transcribed

use graphics.h
7. Write a program that draws a picture of the Halloween pumpkin shown in the following diagram As in the house program shown in Figure 7-7, your picture should be controlled by Several constants: detine HeadRadius 10 ne 01 dene selleicht 15 define youth 03 #define Eye Hecht 32 delne Nowh 02 die Nowoch 02 dedine NTP Row 7 #define Tool with 0.083333 #dene Tooth Hochto 15 7. Write a program that draws a picture of the Halloween pumpkin shown in the following diagram As in the house program shown in Figure 7-7, your picture should be controlled by Several constants: detine HeadRadius 10 ne 01 dene selleicht 15 define youth 03 #define Eye Hecht 32 delne Nowh 02 die Nowoch 02 dedine NTP Row 7 #define Tool with 0.083333 #dene Tooth Hochto 15

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions