zoukankan      html  css  js  c++  java
  • 标识符

    /*
     * 由SharpDevelop创建。
     * 用户: Administrator
     * 日期: 2018/10/20
     * 时间: 12:22
     * 
     * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
     */
    using System;
    
    namespace C工资1
    {
        class Program
        {
            public static void Main(string[] args)
            {
                
                    string str=Console.ReadLine();
                bool isRinght=true;
                if ((str[0]>='a'&&str[0]<='z' ) ||(str[0]>='A'&&str[0]<='Z')||(str[0]>='_')||(str[0]<='@')) {
                
                }else{
                    isRinght=false;
                }
                for (int i = 1; i < str .Length ; i++) {
                    if ((str[i]>='a'&&str[i]<='z' ) ||(str[i]>='A'&&str[i]<='Z')||str[i]>='_'||(str[i]>='0'&&str[i]<='9')) {
                        
                    }else{
                    isRinght=false;
                    }
                }
                if (isRinght=false) {
                        Console.WriteLine("不是合法的标识符");
                }else{
                
                Console.WriteLine("是合法的标识符");
                
                }
                Console.ReadKey();
            }
    
        }
    
    }

    asdfd

    合法的标识符

  • 相关阅读:
    PHP中关于字符串的连接
    好用的FireFox(FF)插件
    Scripted Operation
    Scripted device
    chgrp chown
    wait_for_devices
    mysql create user
    mysql
    create user mysql
    Inserting/Removing shutters and filters
  • 原文地址:https://www.cnblogs.com/llhhcc/p/9821444.html
Copyright © 2011-2022 走看看