国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計 > 正文

上機練習(xí)1-2

2019-11-11 04:46:46
字體:
供稿:網(wǎng)友
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace day02{    class PRogram    {        static void Main(string[] args)        {            int [] points =new int [5];            int[] newpoints = new int[5];            Console.WriteLine("請輸入五位會員的積分");            for (int i = 0; i < points.Length; i++)            {                Console.Write("第"+(i+1)+"位會員積分");                points[i] = Convert.ToInt32(Console.ReadLine());            }            for (int i = 0; i < points.Length; i++)            {                newpoints[i] = points[i];                newpoints[i] = newpoints[i] + 500;            }            Console.WriteLine("/n 序號      歷史積分      新年積分");            for (int i = 0; i < points.Length; i++)            {                Console.WriteLine((i+1)+"           "+points[i]+"           " +newpoints[i]+"         "       );            }            Console.WriteLine("上機一    二分界線------------------------------------------------------------------------");            computer computer = new computer();            computer[] com = new computer[3];            com[0] = new computer();            com[0].type = "hpCQ-217TX";            com[0].date = "2013-10-5";            com[1] = new computer();            com[1].type = "Mc240CH/A";            com[1].date = "2013-10-5";            com[2] = new computer();            com[2].type = "SYNW18H/W";            com[2].date = "2013-10-5";            Console.WriteLine("***************設(shè)置計算機id前***************");            Console.WriteLine("計算機型號/t計算機id/t購買時間");            for (int i = 0; i < com.Length; i++)            {                Console.WriteLine(com[i].type + "/t/t/t" + com[i].date);            }            Random ran = new Random();            com[0].num = ran.Next(1000, 9999);            com[1].num = ran.Next(1000, 9999);            com[2].num = ran.Next(1000, 9999);            Console.WriteLine("***************設(shè)置計算機id后***************");            Console.WriteLine("計算機型號/t計算機id/t購買時間");            for (int i = 0; i < com.Length; i++)            {                Console.WriteLine(com[i].type + "/t" + com[i].type + "-" + com[i].num + "/t" + com[i].date);            }            Console.ReadLine();        }    }}
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace day02{    class computer    {        public string type;        public int num;        public string date;    }}


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 望城县| 越西县| 吉水县| 武夷山市| 涪陵区| 嵊泗县| 越西县| 枞阳县| 社旗县| 遵义市| 浠水县| 方山县| 东光县| 石河子市| 张家口市| 哈巴河县| 和田县| 文昌市| 徐汇区| 盐津县| 柳林县| 古田县| 永定县| 抚松县| 邵阳市| 甘谷县| 山西省| 绥宁县| 修文县| 马边| 织金县| 永春县| 枣阳市| 团风县| 诸城市| 时尚| 万荣县| 邹平县| 浪卡子县| 龙游县| 公安县|