--1. 求半径2米,高3米的圆柱体体积。
declare @high float
declare @r float
declare @pai float
declare @v float
set @high=3
set @r=2
set @pai=3.14
set @[email protected]*@r*@pai*@high
print ‘体积为‘+convert(varchar(20),@v)+‘立方米‘
declear @hight float,@r float,@ratio float ,@ v float set @hight=3 set @r=2 set @ratio =3.14 set @v=@hight*@r*@r*@ratio print ‘体积为‘+convert(varchar(20),@v)+‘立方米‘
时间: 2024-10-13 08:31:45