千里之行始于足下!这是编写的第一个程序:质量计算

// 质量计算.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

int main(int argc, char* argv[])
{
double r=10,p=34,v,w;
v=4.0/3.0/1000*3.1415926*r*r*r;
w=p*v;
printf("weight is %lf\n",w);
return 0;
}

posted @ 2021-04-07 13:55  dyf2019  阅读(60)  评论(0)    收藏  举报