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

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

上機練習1-2

2019-11-11 04:49: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ā)表
主站蜘蛛池模板: 淮安市| 荣昌县| 濮阳市| 江油市| 唐山市| 南川市| 上犹县| 达拉特旗| 安塞县| 孙吴县| 平利县| 那曲县| 大名县| 海兴县| 横山县| 崇州市| 高青县| 涿州市| 壤塘县| 丹巴县| 安宁市| 洪湖市| 财经| 罗田县| 柳州市| 长丰县| 新密市| 宝应县| 永城市| 淳安县| 阿拉尔市| SHOW| 临泽县| 申扎县| 上高县| 秭归县| 辉县市| 龙海市| 安义县| 泽州县| 康乐县|