题目详情
当前位置:首页 > 计算机考试 > 软件测试工程师
题目详情:
发布时间:2023-11-12 02:35:11

[简答题]

以下是某C++程序,用来判定用户口令,请仔细阅读程序并完成要求。
//**********************************************************//
// 口令检验程序 //
// //
// 文件名:password_check.cpp //
//**********************************************************//
#include
#include
//**********************************************************//
// 主 函 数 //
//**********************************************************//
void main(void)

char password[128]=’/0’;
cout<<"请输入您的口令:";
cout.flush( );
while(true)
cin.getline(password,128,’/n’);
if(strlen(password)<6) //口令长度少于6位

cout<<"您的用户口令少于6个字符!"<<ENDL;
cout<<"请重新输入:";
cout.flush( );
else
bool capital=false; //检验是否有大写字母
bool lowercase=false; //检验是否有小写字母
bool digit=false; //检验是否有数字
for(unsigned int i=0;i<STRLEN(PASSWORD);I++)

更多"以下是某C++程序,用来判定用户口令,请仔细阅读程序并完成要求。 "的相关试题:

[简答题]以下是某C++程序,用来判定用户口令,请仔细阅读程序并完成要求。
//**********************************************************//
// 口令验证 //
// //
// 文件名:password_check.cpp //
//**********************************************************//
#include<iostream.h>
#include<string.h>
//**********************************************************//
// 主函数 //
//**********************************************************//
void main(void)

char password[128]=’/0’;
cout<<"请输入您的口令:";
cout.flush( );
while (true)
cin.getline(password,128, ’/n’);
if(strlen(password)<6) //口令长度少于6位

cout<<"您的用户口令少于6个字符!"<<endl;
cout<<"请重新输入:”;
cout.flush( );
else
bool capital=false; //检验是否有大写字母
bool lowercase=false; //检验是否有小写字母
bool digit=false; //检验是否有数字
for(unsigned int i=0; i<strlen(password); i++)
if(password[i]>=’A’&&pass
[简答题]以下是某C程序,用来求一个数的绝对值,请仔细阅读程序并完成要求。
#include "stdio.h"
main( )

float x,y;
scanf("%f",&x);
if (x>0)
y=x;
else
y=-x;
printf ("%f",y);
getch( );

画出此程序主函数的控制流程图。
[简答题]

以下是某C程序,此程序根据输入的学生成绩得出成绩的等级,请仔细阅读程序并完成要求。
int scorelevel(int score)

int level;
if(score>100||score<0) level=-1;
else if(score>=90) level=1;
else if(score>=90) level=2;
else if(score>=90) level=3;
else if(score>=90) level=4;
else level=5;
return level;
 

画出上面程序的控制流图。
[简答题]以下是某C程序,此程序根据输入的学生成绩得出成绩的等级,请仔细阅读程序并完成要求。
int scorelevel(int score)

int level;
if(score>100||score<0) level=-1;
else if(score>=90) level=1;
else if(score>=90) level=2;
else if(score>=90) level=3;
else if(score>=90) level=4;
else level=5;
return level;

画出上面程序的控制流图。
[单项选择]微型计算机软件程序的口令是用来防止:
A. 不正确地处理数据
B. 未经批准访问计算机
C. 不完整地更新数据文档
D. 未经批准使用软件
[简答题]

以下是某C程序段,其功能为计算输入数字的阶乘。请仔细阅读程序并完成要求。
#incllJde
#include
int main( )

int i=0;/*i为计数器*/
int n;
i nt factorial=1; /*保存阶乘的结果*/
puts(" ************************************* ");
puts(" * The program will compute *");
puts(" * the factotial of an integer * ");
puts(" ************************************* ");
puts(" please input the number n: ");
scanf(" % d", &n);
if(n<0)/*判断输入的数是否大于或等于0*/
(
printf(" please input an interger>=0./n");
return 0;

if(n= =0)/* 0的阶乘是1*/

printf(" factorial of 0 is 1./n");
return 0;
)
i=1;
while(i<=n)

factorial=factorial * i;
i++;

printf(" factorial of % d is:%d./n", n, factorial);
geteh( );
re

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码