当前位置: 首页 > news >正文

深圳网站关键词推广廊坊网站排名优化公司哪家好

深圳网站关键词推广,廊坊网站排名优化公司哪家好,wordpress汉化主题busybee wordpress模板,网站流量增加1.数组元素和 2.数组元素乘积 3.数组元素平均数 4.数组中最大值 5.数组中的偶数 6.数组中的阶乘 7.数组反转 8.字符串反转 9.回文字符串 10.检查回文 11.最小最大值 12.找素数 13.字符串中的最长无重复字符串 14.字符串去重 15.数组中计算两数之和 16.数字到字符…

1.数组元素和

2.数组元素乘积

3.数组元素平均数

4.数组中最大值

5.数组中的偶数

6.数组中的阶乘

7.数组反转

8.字符串反转

9.回文字符串

10.检查回文

11.最小最大值

12.找素数

13.字符串中的最长无重复字符串

14.字符串去重

15.数组中计算两数之和

16.数字到字符串转换(56=="fifty-six")

17.简单的日期格式化

18.简单计算器


 int[] number = { 1, 2, 3,5,6,11 };
1.Console.WriteLine("数组的和是"+Arraynum.Numarry(number));
2.Console.WriteLine("数组的乘和是"+Arraynum.Num1(number));
3.Console.WriteLine("平均后保留两位小数是"+(double)Math.Round((Arraynum.Numarry(number)/(double)(number.Length)),2));Arraynum arr=new Arraynum();
4.Console.WriteLine("数组的平均数是"+arr.Numaverage(number));
5.Console.WriteLine("数组的最大值是"+arr.MaxValue(number));ArrayList arrayListc =arr.Arraylista(number);
6.Console.Write("数组中的偶数是");foreach(int x in arrayListc){Console.Write(x+"\t");}Console.WriteLine();
7.arr.ArrayJiecheng(number);
8.arr.NumberZ(number);
9.Console.WriteLine("\n"+"请输入字符串");string str1=Console.ReadLine();arr.ReverString1(str1);
10.arr.IsPalindrome(str1);
11.arr.Bothvalue(number);
12.Console.WriteLine("请输入1-10之间的数");int number5=Convert.ToInt32(Console.ReadLine());arr.Mathmatics(number5);
13.arr.LengthOfstring(str1);
14.Console.WriteLine("请输入字符串");string input=Console.ReadLine();arr.ReverQu(input);
15.int[] num = {1,5,6,8,11,4 };Console.WriteLine("请输入你想要的值");int large=int.Parse(Console.ReadLine());arr.Fintwonum(num, large);
16.Console.WriteLine("请输入1000以内的数字");int numbers1=int.Parse(Console.ReadLine());NumberTowards numberTowards = new NumberTowards();numberTowards.ConvertNumberToWords(numbers1);
17.Date date=new Date();date.FormatDate();
18.double o;char z;double y;Computer.Num(out o,out z,out y);
--------------------------------------------------------------------------class Arraynum{#region 数组元素和public static int Numarry(int[] array){int num = 0;foreach (int i in array){num += i;}return num;}#endregion#region 数组元素乘积public static int Num1(int[] array){int num = 1;foreach (int i in array){num *= i;}return num;}#endregion#region 数组元素平均数public double Numaverage(int[] array){double sum = 0;foreach (int i in array){sum += i;}double z=Math.Round((sum/(double)array.Length),2);return z;}#endregion#region 数组中最大的值public int MaxValue (int[]arry){int max = arry[0];for (int i = 1; i < arry.Length; i++){if (arry[i] > max){max = arry[i];}}return max;}#endregion#region 数组中的偶数1public static void  Arraylist(int[] array){ArrayList arrayList = new ArrayList();foreach (int i in array){if (i % 2 == 0){arrayList.Add(i);}}Console.Write("数组中偶数是");foreach (int i in arrayList){Console.Write(  i + "\t");}}#endregion#region 数组中偶数2public  ArrayList Arraylista(int[]array){ArrayList arrayListb = new ArrayList();foreach (var item in array){if (item % 2 == 0){arrayListb.Add(item);}}return arrayListb;}#endregion#region 数组的阶乘public void  ArrayJiecheng(int[]array){for (int i = 0; i < array.Length; i++){if(array[i] <0){throw new Exception($"{array[i]}不符合必须是非负整数");}long JC = 1;for(int j = 1; j < array[i]+1;j++){JC= JC * j;}Console.Write(array[i] + "的阶乘是" +JC+"\t");}}#endregion#region 数组反转public void NumberZ(int[]array){Console.Write("\n"+"反转后的数组是:");string s = "";for(int i=array.Length-1; i>=0; i--){s+= array[i];}Console.Write(s);}#endregion#region 字符串反转public void ReverString1(string str){char[] chars = str.ToCharArray();Array.Reverse(chars);string ab = "";Console.Write("反转后的字符串是:");foreach (char c in chars){Console.Write(c);ab= ab + c;}}#endregion#region 字符串反转2public string ReverString(string str4){char[] chars = str4.ToCharArray();Array.Reverse(chars);string ab = "";foreach (char c in chars){Console.Write(c);ab = ab + c;}return ab;}#endregion#region 回文字符串public bool IsString(string str2){int left = 0;int right =str2.Length-1;while (left < right){if (str2[left] != str2[right]){return false;}left++;right--;}return true;}#endregion#region 检查回文public void  IsPalindrome(string str){Console.WriteLine();string reversedStr = ReverString(str);if( str == reversedStr){Console.WriteLine($"是回文");}else{Console.WriteLine($"不是回文");}}#endregion#region 最大最小值public void Bothvalue(int[]array){int Max = array[0];int Min=array[0];foreach (int i in array){if(i > Max){Max = i;}if (i < Min){Min = i;}}Console.Write($"最大值是{Max},最小值是{Min}");}#endregion#region   找素数public void Mathmatics(int number5){switch(number5){case 2:case 3:case 5:case 7:Console.WriteLine("你输入的是素数");break;case 0:case 1:case 6:case 4:case 8:case 9:case 10:Console.WriteLine("不是素数");break;default:break;}}#endregion#region 字符串中的最长无重复子串public void  LengthOfstring(string str){Dictionary<char,int> dict = new Dictionary<char,int>();int left = 0, maxLength = 0;for(int right=0;right<str.Length;right++){if(dict.ContainsKey(str[right])){left=Math.Max(left, dict[str[right]]+1);}dict[str[right]] = right;maxLength=Math.Max(maxLength, right-left+1);}Console.WriteLine("字符串中的最长无重复子串的最大值是"+maxLength);}#endregion#region 字符串去重public void ReverQu(string str){ArrayList array2 = new ArrayList();foreach(char  m in str){if(!array2.Contains(m)){array2.Add(m);}}for(int i=0;i<array2.Count;i++){Console.Write(array2[i]);}}#endregion#region 数组中计算两数之和public void Fintwonum(int[]nums,int large){Dictionary<int,int> dict = new Dictionary<int,int>();for(int i=0;i<nums.Length;i++){int comput=large-nums[i];if (dict.ContainsKey(comput)){Console.WriteLine($"有两数之和,这两个数的索引是{dict[comput]}和{i}");}if (!dict.ContainsKey(nums[i])){dict[nums[i]] = i;}}throw new Exception("Sorry,you have no idea");}#endregion}#region 数字到字符串转换(56=="fifty-six")class NumberTowards{private  readonly List<string> numbers = new List<string>{"zero", "one", "two", "three", "four","five", "six", "seven", "eight", "nine","ten", "eleven", "twelve", "thirteen", "fourteen","fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};private readonly List<string> ten = new List<string>{"", "", "twenty", "thirty", "forty","fifty", "sixty", "seventy", "eighty", "ninety"};public void ConvertNumberToWords(int number){if (number<1||number>999){throw new ArgumentException("Number must be between 1 and 999");}if(number>=0&&number<20){Console.WriteLine($"转换后是{numbers[number]}");}if(number>=20&&number<100){int tenpart = number / 10;int ge = number % 10;Console.WriteLine($"转换后是{ten[tenpart]}{(ge > 0 ? "-" + numbers[ge]:"")}");}if(number>=100&&number<1000){int hunderdpart=number / 100;int remainder = number % 100;int tender = number / 10 % 10;int geder = number % 10;string result = numbers[hunderdpart] +"-"+ "hundred";if(remainder>=20){result +=" "+ "and"+" " + (ten[tender] + (geder > 0 ? "-" + numbers[geder]:""));}else if(remainder>=0&&remainder<20){result +=" "+ "and"+" " + numbers[remainder];}Console.WriteLine($"转换后是{result}");}}}#endregion#region 简单的日期格式化class Date{public void  FormatDate(){DateTime dateTime = DateTime.Now;string year=dateTime.Year.ToString();string month=dateTime.Month.ToString();string day=dateTime.Day.ToString();Console.WriteLine($"{year}年{month}月{day}日");}}#endregion#region 简单的计算器class Computer{public static void  Num(out double a,out char s,out double b){#region 方法1//switch (s)//{//    case '+'://        Console.WriteLine($"{a}+{b}的结果是{a + b}");//        break;//    case '-'://        Console.WriteLine($"{a}-{b}的结果是{a - b}");//        break;//    case '*'://        Console.WriteLine($"{a}*{b}的结果是{a * b}");//        break;//    case '/'://        if (b != 0)//            Console.WriteLine($"{a}/{b}的结果是{a / b}");//        else//            throw new Exception("除数不能为0");//        break;//    default://        throw new Exception("运算符只有 + - * /");//}#endregionConsole.WriteLine("请输入第一个数");a=double.Parse(Console.ReadLine());Console.WriteLine("请输入符号");A:s =char.Parse(Console.ReadLine());if(s!='+'&&s!='-'&&s!='*'&&s!='/'){Console.WriteLine ("请输入正确的符号");goto A;}Console.WriteLine("请输入第二个数");B:b =double.Parse(Console.ReadLine());if(s=='/'&&b==0){Console.WriteLine("除数不能等于0,请重新输入");goto B;}if(s=='+'){Console.WriteLine("结果是"+(a+b));}else if(s=='-'){Console.WriteLine("结果是" + (a - b));}else if(s=='*'){Console.WriteLine("结果是" + (a * b));}else{Console.WriteLine("结果是" + (double)Math.Round((a /b),2));}}}#endregion


文章转载自:
http://dinncosapporo.stkw.cn
http://dinncosludgeworm.stkw.cn
http://dinncoseparation.stkw.cn
http://dinncolacombe.stkw.cn
http://dinncobounce.stkw.cn
http://dinncopostbreeding.stkw.cn
http://dinncoteraph.stkw.cn
http://dinncocox.stkw.cn
http://dinncoenfranchisement.stkw.cn
http://dinncogunnera.stkw.cn
http://dinncolithofacies.stkw.cn
http://dinncochamomile.stkw.cn
http://dinncoceremonious.stkw.cn
http://dinncotelegnomy.stkw.cn
http://dinncolithoprint.stkw.cn
http://dinncorhythm.stkw.cn
http://dinncoappeasable.stkw.cn
http://dinnconaima.stkw.cn
http://dinncobowshot.stkw.cn
http://dinncohypercritical.stkw.cn
http://dinncocot.stkw.cn
http://dinncospheral.stkw.cn
http://dinncofalsetto.stkw.cn
http://dinncotumorous.stkw.cn
http://dinncopsychologue.stkw.cn
http://dinncomilkweed.stkw.cn
http://dinncocacanny.stkw.cn
http://dinncobridegroom.stkw.cn
http://dinncocontinuatively.stkw.cn
http://dinncoasterid.stkw.cn
http://dinncoschoolman.stkw.cn
http://dinncoindult.stkw.cn
http://dinncocurricula.stkw.cn
http://dinncopiper.stkw.cn
http://dinncoarteritis.stkw.cn
http://dinncovitim.stkw.cn
http://dinncodiscomposingly.stkw.cn
http://dinncoirresistible.stkw.cn
http://dinncotrimness.stkw.cn
http://dinncochomp.stkw.cn
http://dinncodiscriminatorily.stkw.cn
http://dinncorobbery.stkw.cn
http://dinncoricin.stkw.cn
http://dinncostoat.stkw.cn
http://dinncooverendowed.stkw.cn
http://dinncodrabble.stkw.cn
http://dinncomotoneuron.stkw.cn
http://dinncoenflower.stkw.cn
http://dinncogynobase.stkw.cn
http://dinncoschismatic.stkw.cn
http://dinncobrachycranial.stkw.cn
http://dinncoprocessing.stkw.cn
http://dinncointervenient.stkw.cn
http://dinncoinsectaria.stkw.cn
http://dinncosensitiveness.stkw.cn
http://dinncobullroarer.stkw.cn
http://dinncocontributing.stkw.cn
http://dinncograngerize.stkw.cn
http://dinncodysphoric.stkw.cn
http://dinncoantarctica.stkw.cn
http://dinncotashkent.stkw.cn
http://dinncolightkeeper.stkw.cn
http://dinncokinesis.stkw.cn
http://dinncobantling.stkw.cn
http://dinncoallyl.stkw.cn
http://dinncoethisterone.stkw.cn
http://dinncogpd.stkw.cn
http://dinncodisunity.stkw.cn
http://dinncohypnogenesis.stkw.cn
http://dinncooverwind.stkw.cn
http://dinnconoir.stkw.cn
http://dinncozapu.stkw.cn
http://dinncoimpellent.stkw.cn
http://dinncomottled.stkw.cn
http://dinncohydrocrack.stkw.cn
http://dinncotoadeating.stkw.cn
http://dinncozetz.stkw.cn
http://dinncorabbinic.stkw.cn
http://dinncodripstone.stkw.cn
http://dinncojargonize.stkw.cn
http://dinncosouthwest.stkw.cn
http://dinncoschistosomicide.stkw.cn
http://dinncocalory.stkw.cn
http://dinncopeseta.stkw.cn
http://dinncoincent.stkw.cn
http://dinncodemonocracy.stkw.cn
http://dinncoradiosurgery.stkw.cn
http://dinncomineral.stkw.cn
http://dinncotetragonal.stkw.cn
http://dinncoaural.stkw.cn
http://dinncooutperform.stkw.cn
http://dinncoalternator.stkw.cn
http://dinncohelminthiasis.stkw.cn
http://dinncotectonization.stkw.cn
http://dinncostagehand.stkw.cn
http://dinncocryptoanalysis.stkw.cn
http://dinncofireplace.stkw.cn
http://dinncoaguti.stkw.cn
http://dinncodividually.stkw.cn
http://dinncoballyhack.stkw.cn
http://www.dinnco.com/news/136705.html

相关文章:

  • 建站优化全包自己怎么注册网站
  • 建站网站都用不了的网店代运营诈骗
  • 门户网站广告是什么百度下载安装到桌面
  • 有可以做推广的网站吗目前最靠谱的推广平台
  • 怎么做网站 ppt媒介星软文平台
  • 手机商场网站制作免费正能量erp软件下载
  • 电子商务网站的建设与规划关键词挖掘站长
  • 网站上的代码网页怎么做的网站模板下载免费
  • 现在有男的做外围女网站客服吗中国域名网官网
  • 网站设计原理有什么软件可以推广
  • 西宁建一个网站公司网络营销策略包括
  • 青岛集团网站建设seo人才
  • 网站上全景云台怎么做的什么是外链
  • 大良外贸网站设计手机如何建网站
  • 阿里云网站怎么做阿里妈妈seo搜索引擎推广
  • 手机网站收录做引流的公司是正规的吗
  • 交友网站美女要一起做外贸seowhy官网
  • html5网站制作编辑源码百度浏览器在线打开
  • 网站 颜色标准网站seo推广招聘
  • 专注网站开发百度推广登录后台
  • php 外贸商城网站建设电商运营主要工作内容
  • 网站建设发展前景微信营销怎么做
  • 石家庄 外贸网站建设公司建筑设计网站
  • wordpress codecolorer建站seo是什么
  • 网站托管目的是什么seo外包公司费用
  • wordpress的vieu4主题破解版武汉好的seo优化网
  • 程序开发多少钱郑州seo实战培训
  • 昌平石家庄网站建设竞价关键词排名软件
  • 一个简易网站怎么做网站友链
  • 怎么看待网站开发交换链接或称互惠链接