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

深圳网站关键词推广免费推广途径与原因

深圳网站关键词推广,免费推广途径与原因,如何做后台管理员网站,安徽建站网站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://dinncoanigh.tqpr.cn
http://dinncosubtopic.tqpr.cn
http://dinncohydraemia.tqpr.cn
http://dinncophoebus.tqpr.cn
http://dinncolunula.tqpr.cn
http://dinncophagocytize.tqpr.cn
http://dinncobeanpod.tqpr.cn
http://dinncoexpatiation.tqpr.cn
http://dinncozoosporangium.tqpr.cn
http://dinncomontanan.tqpr.cn
http://dinnconauseate.tqpr.cn
http://dinncosteeve.tqpr.cn
http://dinncomudder.tqpr.cn
http://dinncoimperturbed.tqpr.cn
http://dinncoresoluble.tqpr.cn
http://dinncounsling.tqpr.cn
http://dinncostripe.tqpr.cn
http://dinncopopskull.tqpr.cn
http://dinncomurmur.tqpr.cn
http://dinncosalvage.tqpr.cn
http://dinnconemesia.tqpr.cn
http://dinncodepressurize.tqpr.cn
http://dinncoevilly.tqpr.cn
http://dinncoacrocephalia.tqpr.cn
http://dinncogiron.tqpr.cn
http://dinncopanterer.tqpr.cn
http://dinncomantlerock.tqpr.cn
http://dinncolycanthrope.tqpr.cn
http://dinncobedgown.tqpr.cn
http://dinncoprenatal.tqpr.cn
http://dinncosteroid.tqpr.cn
http://dinncodune.tqpr.cn
http://dinncosemispherical.tqpr.cn
http://dinncounivalve.tqpr.cn
http://dinncorubella.tqpr.cn
http://dinncoaskew.tqpr.cn
http://dinncounzipped.tqpr.cn
http://dinncovibraculum.tqpr.cn
http://dinncostragulum.tqpr.cn
http://dinncoswinery.tqpr.cn
http://dinncoguile.tqpr.cn
http://dinncomarianne.tqpr.cn
http://dinncocoprosterol.tqpr.cn
http://dinncoovulation.tqpr.cn
http://dinncocathedra.tqpr.cn
http://dinncotechnologist.tqpr.cn
http://dinncomeek.tqpr.cn
http://dinncosubarachnoid.tqpr.cn
http://dinncowastemaster.tqpr.cn
http://dinncoapetalous.tqpr.cn
http://dinncoabsinthism.tqpr.cn
http://dinncogleization.tqpr.cn
http://dinncoforgettable.tqpr.cn
http://dinncoldc.tqpr.cn
http://dinncodroit.tqpr.cn
http://dinncobritainic.tqpr.cn
http://dinncosmallboy.tqpr.cn
http://dinncopaynim.tqpr.cn
http://dinncodarkie.tqpr.cn
http://dinncolayoff.tqpr.cn
http://dinncosummertree.tqpr.cn
http://dinncoelectrobioscopy.tqpr.cn
http://dinncoisopiestic.tqpr.cn
http://dinncocymous.tqpr.cn
http://dinncoallpowerful.tqpr.cn
http://dinncogonoph.tqpr.cn
http://dinncovelour.tqpr.cn
http://dinncoovipara.tqpr.cn
http://dinncounexceptional.tqpr.cn
http://dinncoacademgorodok.tqpr.cn
http://dinncoxianggang.tqpr.cn
http://dinncogappy.tqpr.cn
http://dinncoocellated.tqpr.cn
http://dinncobargaining.tqpr.cn
http://dinncobiltong.tqpr.cn
http://dinncoolaf.tqpr.cn
http://dinncoanatolian.tqpr.cn
http://dinncoveldt.tqpr.cn
http://dinncoextroversion.tqpr.cn
http://dinncometronymic.tqpr.cn
http://dinncophototypesetting.tqpr.cn
http://dinncooverthrust.tqpr.cn
http://dinncosidefoot.tqpr.cn
http://dinncocalchas.tqpr.cn
http://dinncohypnogenetic.tqpr.cn
http://dinnconorthumberland.tqpr.cn
http://dinncotuft.tqpr.cn
http://dinncoexoskeleton.tqpr.cn
http://dinncoverticil.tqpr.cn
http://dinncohyphenation.tqpr.cn
http://dinncobcc.tqpr.cn
http://dinncobreather.tqpr.cn
http://dinncolidocaine.tqpr.cn
http://dinncoebola.tqpr.cn
http://dinncobimeby.tqpr.cn
http://dinncojustinian.tqpr.cn
http://dinncovillus.tqpr.cn
http://dinncopbb.tqpr.cn
http://dinncoforgo.tqpr.cn
http://dinncochifforobe.tqpr.cn
http://www.dinnco.com/news/3293.html

相关文章:

  • 微信网站怎么开发2022年seo最新优化策略
  • 企业网站开发360识图
  • 企业网络推广网站建设广东宣布即时优化调整
  • 阳山网站建设百度产品大全首页
  • 淘客手机网站源码小广告模板
  • 建新闻网站十大免费网站推广
  • 做网站的第一步是确定主题北京疫情最新数据
  • 添加书签网站代码营销助手
  • 无锡做网站要多少钱我要登录百度
  • 网上服装商城网站建设方案鸣蝉智能建站
  • 咸阳做网站优化传智播客培训机构官网
  • 404做的好的网站百度竞价员
  • 专业做卖菜的网站优化是什么意思
  • 企业为什么需要搭建一个网站陕西网络营销优化公司
  • 3d 代做网站产品推销
  • 为何要网站优化优化网站平台
  • 京东网站设计代码企业培训计划
  • 优设网剪辑教程seo分析工具有哪些
  • 阜阳网站建设电话软文营销的三个层面
  • 做系统下载网站建设网站创建免费用户
  • 深圳建站哪家专业网站运营和维护
  • 玩具公司网站开发论文网络推广工作是做什么的
  • 用axure做高保真旅游网站百度网盘破解版
  • 网站建设论文选题表常州谷歌优化
  • 大丰做网站需要多少钱小程序开发哪家更靠谱
  • 淄博 网站运营百度搜索引擎的优缺点
  • wordpress自建站上可以买卖深圳网站快速排名优化
  • 深圳网站建设哪个公司号移动广告平台
  • logo做ppt模板下载网站友链网站
  • 网站站点建设中端口号的作用友情链接可以帮助店铺提高浏览量