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

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

上機練習1-2

2019-11-11 06:15:42
字體:
來源:轉載
供稿:網(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("***************設置計算機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ā)表
主站蜘蛛池模板: 昆山市| 饶平县| 张掖市| 普格县| 兴城市| 浙江省| 潜山县| 乃东县| 双流县| 通江县| 同心县| 墨玉县| 柳林县| 家居| 宜川县| 汉源县| 泸溪县| 黄平县| 广东省| 镇雄县| 宁津县| 木里| 磐安县| 赤水市| 司法| 根河市| 昔阳县| 和龙市| 崇左市| 亚东县| 共和县| 项城市| 岳阳县| 许昌县| 微山县| 晴隆县| 离岛区| 马边| 中卫市| 佛冈县| 雅安市|