Assume that the surface of Venus is a flat circular disk with a radius of 6050 k
ID: 645790 • Letter: A
Question
Assume that the surface of Venus is a flat circular disk with a radius of 6050 km. Assume all meteor paths are perpendicular to the model of Venus as a flat disk. Assume that two sizes of meteors will hit Venus, each size has a different probability of hitting Venus, and each meteor of the same diameter will produce a crater of the same diameter.
Modify the C program below to estimate a location for each hit on a Cartesian grid during the same 1000 year interval. Have your program print of the sizes and location coordinates of the craters during the run.
So far this is what I have...
//location of meteor crash
#include
#include
#include
int main()
{
float m, x, y, r=x*x+y*y;
int i;
r=6050;
printf("Enter either 50 or 5 (in meters) to determine the coordinates of the meteor hitting Venus ");
scanf("%f",&m);
srand(time(NULL));
//50 m Meteor
if (m==50)
{
for(i=0;i<=5;i++)
printf("The coordinates for a 50 m meteor are (%f, %f) ", x, y
6050*rand()/RAND_MAX);
}
//5 m Meteor
else if (m==5)
{
for (i=0;i<=5;i++)
{
printf("The coordinates for a 5 m meteor are (%f, %f) ", x, y);
}
}
return 0;
}
Explanation / Answer
Using the formula
//void findcor()
{
x=r*sin(180);
y=r*cos(90);
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.