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

首頁 > 學院 > 開發(fā)設計 > 正文

上機練習1-2

2019-11-11 05:22:39
字體:
來源:轉載
供稿:網友
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("***************設置計算機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("***************設置計算機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ā)表
主站蜘蛛池模板: 神农架林区| 玉山县| 南江县| 始兴县| 龙川县| 米脂县| 株洲市| 黎城县| 河池市| 清原| 盐源县| 保山市| 罗源县| 扶绥县| 东乡县| 东方市| 奈曼旗| 甘泉县| 宜良县| 克拉玛依市| 新昌县| 合水县| 奈曼旗| 洪江市| 陈巴尔虎旗| 安阳市| 嵊州市| 南丰县| 中卫市| 左权县| 宜春市| 融水| 天等县| 五家渠市| 开封县| 汾西县| 仪征市| 石台县| 繁峙县| 辽中县| 昔阳县|