更多"下列程序的功能是:将字符串“abcde”逆序打印出来。请填写空白处以完"的相关试题:
[填空题]下列程序的功能是:将字符串“abcde”逆序打印出来。请填写空白处以完善程序。
Function rev(str1) As String
B=Mid(______,1,1)
If B=""Then
rev=""
Else
rev=tev(Mid(str1,2))+______
End If
End Function
Private Sub Form_Click( )
old="abcde"
Print rev(old)
End Sub
[填空题]下列程序的功能是:将字符串“abcde”逆序打印出来。请填写空白处以完善程序。
Function rev(str1) As String
B=Mid(______,1, 1)
If B= "" Then
rev=""
Else
rev=rev(Mid(str1, 2)) +______
End If
End Function
Private Sub Form_Click( )
old ="abcde"
Print rev(old)
End Sub
[简答题]函数fun( )的功能是:将字符串中的字符按逆序输出,但不改变字符串中的内容。例如,若字符串为abcd,则应输出dcba。
#include<stdio.h>
/**********found**********/
fun(char a)
if(*a)
fun(a+1);
/**********found**********/
printf("%c"*a);
main( )
char s[10]="abcd";
printf("处理前字符串=%s/n处理后字符串=",s);
fun(s);printf("/n");
[填空题]以下程序的功能是将字符串“12345”逆序打印出来。请在画线处填上适当的内容使程序完整。
Function rev(newl)As String
b=Mid( (12) ,1,1)
if b=" "then
rev=" "
else
rev=rev(Mid(new 1,2))+ (13)
end if
End Function
Private Sub Form_Click( )
old="12345"
Print old
Print rev(old)
End Sub
[简答题]本题程序将字符串sir中的字符a用$符号代替,然后将字符串中第一个$字符前的听有字符去掉,并打印输出最后的str字符串。请将下述程序补充完整(注意:不得改动程序的结构,不得增行或删行)。
public class basic
public static void main(String[] args)
String str = "Iamagoodboy,andwhataboutyou";
str =______;
int pos =______;
str =______;
System.out.println (str);
[填空题]以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符串。例如,输入字符串 :abc123edf456gh,执行程序后输出:123456请填空.
#include <stdio.h>
#include <ctype.h>
main( )
char s[80], d[80]; int i,j;
gets(s);
for (i=j=0;s[i]!=’/0’;i++)
if( ) d[j]=s[i]; j++;
d[j]=’/0’;
puts (d);
[填空题]以下程序的功能是将字符串s中的数字字符放人d数组中,最后输出d中的字符串。例如,输入字符串abc123edf456gh,执行程序后输出123456。请填空。
# include<stdio. h>
# include<ctype. h>
main( )
{ char s[80], d[80]; int i, j;
gets(s);
for(i=j=0; s[i]!=’/0’; i++)
if( 【6】 ){ d[j]=s[i]; j++;)
d[j]=’/0’;
puts(D) ;
}
[填空题]以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符串。
例如,输入字符串:abc123edf456gh,执行程序后输出:123456。请填空。
#include <stdio.h>
#include <ctype.h>
main( )
{ char s[80],d[80]; int i,j;
gets(s);
for(i=j=0;s[i]! =’/0’;i++)
if( 【9】 ) {d[j]=s[i]; j++;}
d[j]=’/0’;
puts(d);
}
[填空题]以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符串。例如,输入字符串:abcl23edf456gh,执行程序后输出:123456。请填空。
#include <stdioo.h>
#include <ctype.h>
main( )
char s[80],d[80]; int i,j;
gets(s);
for(i=j=0;s[i]!=’/0’;i++)
if( 【20】 )d[j]=s[i];j++;
d[j]=’/0’;
puts(d);
[填空题]以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符串。例如,输入字符串:
abcl23edf456gh,执行程序后输出:123456。请填空。
#include<stdio.h>
#include<ctype,h>
main( )
char s[80],d[80];int i,j;
gets(s);
for(i=j=0;s[i]!=’/0’;i++)
if(______)d[j]=s[i];j++;
d[j]=’/0’;
puts(d) ;