Question
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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started