IF的使用
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks; namespace 第四个程序
{
class Program
{
static void Main(string[] args)
{ Console.WriteLine("请输入密码");
string password = Console.ReadLine();
if (password == "")
{
Console.WriteLine("密码正确");
}
else
{
Console.WriteLine("请重新输入");
password = Console.ReadLine();
if (password == "")
{
Console.WriteLine("密码正确");
}
else
{
Console.WriteLine("程序错误");
}
}
Console.WriteLine("程序结束");
Console.ReadKey(); }
}
}
运行效果:

随机推荐
- 一种CentOS图形界面的修复方法
刚跳槽来这个公司,第一个任务是一块PCIE8120卡的应用开发.尼玛,别人来培训过.演示过的,现在居然没一个人能把别人演示的东西演示给我看!只好自己折腾去了.把服务器搬到自己旁边空位方便折腾,结果发现 ...
- linux所有信息查询网址
- javascript变量说明
定义变量 var test = "hi"; 在这个例子中,声明了变量 test,并把它的值初始化为 "hi"(字符串).由于 ECMAScript 是弱类型的, ...
- cocos2d-x中的尺寸之三
通过上面两个文章的分析,我们在这个博文里做个总结: CCEGLView::getFrameSize()返回的是窗口相对于屏幕像素的尺寸,这个尺寸,只要窗口没变化,值就不会变化 CCDirector:: ...
- HDU 3584 Cube
题目大意:给定一个体积为N*N*N立方体,每个单位小立方体A[x][y][z]里有一个值,初始值全部为0,我们可以对立方体进行一下两种操作: 0表示查询A[x][y][z]的奇偶性 1表示对子立方体的 ...
- nginx自定义模块记录上游服务器特定响应头
功能,服务器通过扩展自定义命令,记录上游的服务器返回的特定响应头内容,记录到本地文件中 代码如下: /* * Copyright (C) Ciaos */ #include <ngx_confi ...
- Jenkins持续集成相关文章整理
构建iOS持续集成平台(一)——自动化构建和依赖管理 构建iOS持续集成平台(二)——测试框架 构建iOS持续集成平台(三)——CI服务器与自动化部署 使用Jenkins搭建iOS开发的CI服务器 一 ...
- Setting property 'source' to 'org.eclipse.jst.jee.server [问题点数:40分]
链接地址:http://bbs.csdn.net/topics/390131469 警告: [SetContextPropertiesRule]{Context} Setting property ' ...
- Mini-project # 4 - "Pong"___An Introduction to Interactive Programming in Python"RICE"
Mini-project #4 - "Pong" In this project, we will build a version of Pong, one of the firs ...
- BZOJ 1019: [SHOI2008]汉诺塔( dp )
dp(x, y)表示第x根柱子上y个盘子移开后到哪根柱子以及花费步数..然后根据汉诺塔原理去转移... ------------------------------------------------ ...