1. 程式人生 > >C#第二章課後作業2

C#第二章課後作業2

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            int i, j;
            for (i = 1; i <= 5; i++)
            {
                for (j = 1; j <= i; j++)
                {
                    Console.Write(i);
                }
                Console.WriteLine();
            }
            Console.ReadLine();
        }
    }


}

相關推薦

C#第二課後作業2

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T

C#第二課後作業3

using System.Text; using System.Threading.Tasks; namespace ConsoleApplication4 { class Program

c#第二課後第三題

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp

使用C# 第一課後作業

課後作業三using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.L

c#第二課後第二

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp

第二實驗作業2-7題

7實驗作業 2.編寫程式輸入一個三角形的三條邊,計算其面積和周長; #include<iostream> #include<math.h> using namespace std; int main() { float a,b,c,p,S,C;

資料庫程式設計第二課後作業

#第三題 SELECT bName,bid,author,pubComp,price FROM book WHERE bid NOT IN( SELECT nif FROM boorrow) #第四題 SELECT r.rName,b.bName,p.pData,p.am

實驗2第二課後習題)(截圖版)

思路 實驗 div 分享 合數 一個 總結 gpo png 2-28 2-29 思路:用一個函數來判斷是否是質數,再決定輸出與否。 2-32 2-34 思路:用函數的遞歸來求組合數。 總結:我之前組合數不會求,我現在會用遞歸函數來求組合數。 實驗2(第二章

C++ premier 第二課後

課後題 style font 不包含 ron 超過 什麽 spa 類型 2.1:int、 long 、short 類型的區別 short、 int 和 long 類型都表示整型值, 存儲空間的大小不同。一般, short類型為半個機器字長,int 類型為一個機器字長

C# 第二 作業

課後作業 1.說說你學過哪些迴圈 for 迴圈 while迴圈 do while迴圈 雙重for迴圈foreach迴圈 2.編寫C#程式,定義一個數組 int [i] number = new int []{1,2,3,4,5};使用fo’reach迴圈輸出陣列中的資料,要求遇到3將不輸出,

[C]第二--分支語句與迴圈語句(2)--實戰演練

分支語句與迴圈語句 拉門簾 ATM機登入介面 折半查詢(二分查詢) 猜數字 關機小程式 只有在實際應用中才可以感受到分支與迴圈語句的微妙之處. 以下列舉幾個筆者練習過的比較經典的例題. 拉門簾 要求: 編

C# 第二 作業

課後作業 1.說說你學過哪些迴圈 for 迴圈 while迴圈 do while迴圈 雙重for迴圈foreach迴圈 2.編寫C#程式,定義一個數組 int [i] number = new int []{1,2,3,4,5};使用fo’reach迴圈

深入。NET平臺和C#程式設計 第二課後練習 購物 + 加分

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T

ACCP7.0S2深入.NET和C#程式設計第二上機1,2

-------上機1 class 上機1 { static void Main(string[] args) { int[] oldpoint = new int[5]; int[] n

【高編作業第二課後

2-1message = "Hello World"print(message)2-2message = "one"print(message)message = "two"print(message)2-3name = "Jackson"print("Hello %s, w

C#第四課後練習2

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T

深入.NET平臺和C#理解--第二上級(1,2)--積分更新和計算機ID

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T

02方法 課後作業2

exti idt println cnblogs 9.png recursion out height input 【設計思想】: 1、定義一個函數void hanio(int n,String a,String b,String c)來實現盤子的轉移,改變a,b,c得順序

課後作業2:遞歸編程解決漢諾塔問題

args 漢諾塔問題 char ext n) 兩個 port one input 【程序設計思想】 將A座上盤子移到C座上,實現的操作:1,將A座上除最下面其余盤子移到B座上2,將A座上一個盤子移到C座上3,將B座上盤子移到C座上。

第二 線性表2(鏈接表)

first ppr bound 是否 class nds lang spl ado 3.5.2 鏈接表接口 鏈接表可以看成是一組結點序列以及基於結點進行操作的線性結果的抽象,或則說是對鏈表的抽象。 鏈接表的接口: 1 package com.datastructure