国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 罗源县| 绥化市| 石渠县| 平山县| 徐汇区| 霍邱县| 锦州市| 普定县| 灵丘县| 林口县| 宁晋县| 黄大仙区| 怀宁县| 松滋市| 永德县| 和田市| 灵台县| 商洛市| 肇庆市| 潜山县| 灵山县| 淅川县| 庆阳市| 平原县| 郁南县| 手游| 阳春市| 青铜峡市| 江源县| 平度市| 凉城县| 奉化市| 柳河县| 喀喇沁旗| 辛集市| 子长县| 南通市| 班戈县| 客服| 逊克县| 平阴县|