email地址的格式是:用户名@域名,变量 @dz中存放的是一个有效的email地址,提取其中的用户名并输出,完善执行下列任务的程序:
___________ @dz varchar(50),@userstr varchar(50),@i tinyint, @n tinyint
set @dz='uxyz_123@136.com'
set @n=LEN(@dz)
set _________
while ____________
begin
if SUBSTRING(@dz,@i,1)='@'
_________
set @i=@i+1
_______
set @userstr= LEFT(@dz,@i-1)
print 'email:'+ @dz+char(13)+'其中的用户名:' + @userstr
___________ @dz varchar(50),@userstr varchar(50),@i tinyint, @n tinyint
set @dz='uxyz_123@136.com'
set @n=LEN(@dz)
set _________
while ____________
begin
if SUBSTRING(@dz,@i,1)='@'
_________
set @i=@i+1
_______
set @userstr= LEFT(@dz,@i-1)
print 'email:'+ @dz+char(13)+'其中的用户名:' + @userstr
举一反三
- 下列程序段执行的结果是()。 declare @s int ,@i int ,@j int set @s=0 set @i=1 while @i<=3 begin set @j=1 while @j<=@i begin set @s=@s+@j set @j=@j+1 end set @i=@i+1 end <br/>print @s A: 12 B: 10 C: 6 D: 3
- 下列程序段执行的结果是()。 declare @s as int,@i as int set @s=0 set @i=1 while @i<=10 begin if @i%3=0 begin set @i=@i+2 continue end set @s=@s+@i set @i=@i+2 end print @s A: 55 B: 25 C: 13 D: 12
- 函数z=,则函数的全微分为() A: dz=()dx B: dz=()dy C: dz= ()dx+()dy D: dz=0
- 函数\(z = {x^y}\)的全微分为 A: \(dz = y{x^{y - 1}}dy + {x^y}\ln xdx\) B: \(dz = y{x^{y - 1}}dx + {x^y}dy\) C: \(dz = y{x^{y - 1}}dx + {x^y}\ln xdy\) D: \(dz = y{x^{y - 1}}dy + {x^y}dx\)
- 写出下面程序段的执行结果: Declare @m int,@n int Select @m=0, @n=0 While @m<30 Begin Set @[email protected]+3 Set @[email protected][email protected] End Select @m, @n