blob: 6f4290c440964c46f7fa783ff02c70cb356288c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
clc
//Initialization of variables
weight = 9800 //Kg
g=9.81 //m/s^2
a=2 //m/s^2
//calculations
m=weight/g
Wm=m*a
//results
printf("Density on earth =%.2f Kg/m^3",m)
printf("\n Weight on moon = %.2f N",Wm)
printf("\n Density on moon remains unchanged and is equal to %.2f Kg/m^3",m)
|