更多"以下程序的功能是:对输入的一行字符中的数字字符的字面值累加,输出此累加"的相关试题:
[填空题]以下程序的功能是从键盘上输入一行字符,存入一个字符数组中,然后输出该字符串。请填空。
main( )
char str[81],*sptr;
int i;
for(i=0;i<80;i++)
str[i]=getchar( );
if(str[i]==’/n’)break;
str[i]= 【10】 ;
sptr=str1
while(* sptr)putchar(* sptr 【11】 );
[填空题]以下程序的功能是:对输入的一行字符中的数字字符的字面值累加,输出此累加和,
请填空。
#include<stdio.h>
#include<ctype.h>
main( )
{char c;
int a,s=0;
while(______)
if(isdigit(c))
{a=c-’0’;s+=a;}
printf("S=%d",s);
}
[填空题]以下程序的功能是:对输入的一行字符中的数字字符的字面值累加,输出此累加和,
请填空。
#include<stdio.h>
#include<ctype.h>
main( )
char c;
int a,s=0;
while(______)
if(isdigit(c))
a=c-’0’;s+=a;
printf("S=%d",s);
[填空题]以下程序的功能是,从键盘上输入若干数据,统计并输出最大值和最小值,当输入负数时结束输入,请填空。
Dim amax As Single,amin As Single
x=InputBox("请输入数据")
amax=x
amin=x
Do While 【8】
If x>amax Then
amax=x
End If
If 【9】 Then
amin=x
End If
x=InputBox("请输入数据")
Loop
Print "Max=";amax;"Min=";amin
End Sub
[填空题]下列程序的功能是对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。
#include<stdio.h>
#include<ctype.h>
main( )
char c;
int a,s=0;
while(______)
if(isdigit(c))
a= c-’0’;s+=a;
printf("s=%d",s);
[填空题]下列程序的功能:对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。
#include<stdio.h>
#include<ctype.h>
main( )
{ char c;
int a,s=0;
while(______)
if(isdigit(c))
{a=c-’0’;s+=a;}
printf("s=%d",s);
}
[填空题]下列程序的功能是对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。
# include<stdio.h>
# include<ctype.h>
main( )
char c;
mt a,s=0;
while(______)
if(isdigit(c))
a=s-’0’;s+=a;
printf("s=%d",s);
[填空题]下列程序的功能是对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。
#include<stdio.h>
#include<ctype.h>
main( )
char c;
int a,s=0;
while(______)
if(isdigit(C) )
a=c-’0’;s+=a;
printf("s=%d",s);
[填空题]下列程序的功能:对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。
#include<stdio.h>
#include<ctype.h>
main( )
char c;
int a,s=0;
while(______)
if(isdigit(c))
a=c-’0’;s+=a;
printf("s=%d",s);
[填空题]下列程序的功能是对输入的一行字符中的数字字符的字面值累加,输出此累加和,请填空。
#include<stdio.h>
#include<ctype.h>
main( )
{ char c;
int a,s=0;
while(______)
if(isdigit(c))
{a= c-’0’;s+=a;}
printf("s=%d",s);
}
[填空题]以下程序的功能是:将输入的正整数按逆序输出。例如:若输入135则输出531,请填空。
#include
main( )
int n,s;
printf("Enter a number:"); scanf("%d",&n);
printf("Output: ");
do
s=n%10; printf("%d",s); ______;
while(n!=0);
printf("/n");
[填空题]以下程序的功能是:将输入的正整数按逆序输出。例如:若输入135则输出531。请填空。
#include
main( )
{ int n,s;
prinff("Enter a number:");scanf("%d",&n);
printf("output: ");
do
{ S=n%10;printf("%d",s).【 】;}
while(n!=O);
printf("\n");
}