国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

C#程序設(shè)計實驗

這篇具有很好參考價值的文章主要介紹了C#程序設(shè)計實驗。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

C#實驗

C#程序設(shè)計實驗

實驗1 C# 基本編程

題目

VS下新建一個控制臺項目:諸如:hello world程序,運行程序輸出結(jié)果。并解釋C#程序的結(jié)構(gòu):

諸如:一個基本的C#程序包含幾部分 ,每一部分的功能是什么。。。

完整代碼
using System;//導(dǎo)入System命名空間
namespace HelloWorldApplication//命名空間
{
    /* 類名為 HelloWorld */
    class HelloWorld
    {
        /* main函數(shù) */
        static void Main(string[] args)
        {
            /* 我的第一個 C# 程序 */
            Console.WriteLine("Hello World!");//在控制臺輸出Hello World!并換行
            Console.ReadKey();//等待鍵盤輸入,防止一閃而過
        }
    }
}
運行結(jié)果

C#程序設(shè)計實驗這段代碼是一個經(jīng)典的 “Hello World” 程序,用于展示 C# 語言的基本結(jié)構(gòu)和輸出功能。下面對代碼進(jìn)行解析:

導(dǎo)入 System 命名空間
其中包含了 Console 類,用于處理控制臺輸入輸出。
csharpCopy code
using System;
定義命名空間 HelloWorldApplication
命名空間用于組織和管理代碼。
csharpCopy codenamespace HelloWorldApplication
{
   
}
定義一個類 HelloWorld
包含了程序的主要邏輯。
csharpCopy codeclass HelloWorld
{
  
}
HelloWorld類中、定義了 staticMain 方法,是程序的入口點。
csharpCopy codestatic void Main(string[] args)
{
    
}
Main 方法中,使用 Console.WriteLine 方法打印文本 “Hello World!” 到控制臺,并使用 Console.ReadKey 方法等待用戶按下任意鍵。
csharpCopy codeConsole.WriteLine("Hello World!");
Console.ReadKey();

以上就是該代碼的解析,它實現(xiàn)了一個簡單的控制臺應(yīng)用程序,輸出 “Hello World!” 到控制臺,并等待用戶按下任意鍵才退出。這是 C# 程序的基本結(jié)構(gòu),用于入門學(xué)習(xí)和展示語言特性。

實驗2 C#面向?qū)ο缶幊?/h4>

題目

建立一個控制臺程序,設(shè)計一個cat 類,在該類中定義cat的顏色 年齡 等屬性,并建立一個方法輸出“叫聲”。

在程序中建立類的對象讀取 和 設(shè)置 cat 的屬性值,并調(diào)用方法輸出 貓的 “叫聲”

完整代碼
using System;
namespace HelloWorld
{
    class Cat
    {
        private string color;//貓的顏色
        private int age;  //年齡字段
        public int Age//年齡屬性,用戶對外操作age
        {
            get
            {
                return age;
            }
            set
            {
                age = value;
            }
        }
        
        public string Color//顏色屬性,用戶對外操作age
        {
            get
            {
                return color;
            }
            set
            {
                color = value;
            }
        }
        

        public void hall()
        {
            Console.WriteLine("一只"+this.age+"歲"+this.color+"的貓正在叫:喵喵喵!");
        }
    }
    class Program
    {
        public static void Main(string[] args)
        {
            Cat cat = new Cat();
            cat.Age = 10;
            cat.Color = "灰色";
            cat.hall();
            Console.ReadKey();
        }
    }
}

運行結(jié)果

C#程序設(shè)計實驗

這段代碼定義了一個名為 Cat 的類,并在 Main 方法中創(chuàng)建了一個 Cat 的實例并使用其屬性和方法。

定義 Cat
csharpCopy codeclass Cat
{
    private string color;
    private int age;
    public int Age
    {
        get
        {
            return age;
        }
        set
        {
            age = value;
        }
    }
        
    public string Color
    {
        get
        {
            return color;
        }
        set
        {
            color = value;
        }
    }
        

    public void hall()
    {
        Console.WriteLine("一只"+this.age+"歲"+this.color+"的貓正在叫:喵喵喵!");
    }
}

在這個類中,我們定義了私有字段 colorage,分別表示貓的顏色和年齡。然后,使用屬性 AgeColor 封裝了這兩個字段,以提供對它們的訪問和設(shè)置。AgeColor 屬性具有 getset 訪問器,使得我們可以通過 cat.Agecat.Color 來獲取和設(shè)置貓的年齡和顏色。最后,定義了一個名為 hall 的方法,用于輸出貓的叫聲。

Main 方法中使用 Cat
csharpCopy codepublic static void Main(string[] args)
{
    Cat cat = new Cat();
    cat.Age = 10;
    cat.Color = "灰色";
    cat.hall();
    Console.ReadKey();
}

Main 方法中,我們創(chuàng)建了一個名為 catCat 類型的實例。然后,使用屬性訪問器 cat.Agecat.Color 分別設(shè)置貓的年齡為 10 和顏色為 “灰色”。接著,調(diào)用 cat.hall() 方法,輸出貓的叫聲。最后,使用 Console.ReadKey() 等待用戶按下任意鍵退出程序。

實驗3 C#面向?qū)ο蟾呒壘幊?/h4>

題目

建立一個控制臺程序,(1)定義一個Person類,具有姓名(Name)、年齡(Age)、性別(Sex)等屬性;
(2)從Person類派生一個Student類,具有三個課程成績的數(shù)據(jù)成員,并具有SetScores方法(輸入學(xué)生的3門成績)、GetAverage方法(求平均成績);
(3)Student類要求其構(gòu)造函數(shù)具有三種重載形式:1、無參;2、具有姓名、年齡、性別三個參數(shù)的構(gòu)造函數(shù);3、具有姓名、年齡、性別、成績六個參數(shù)的構(gòu)造函數(shù);
(4)在Program類的Main方法中,使用Student的三個重載形式創(chuàng)建對象,并調(diào)用其GetAverage方法顯示平均成績;

完整代碼
using System;
namespace HelloWorld
{
    class Person
    {
        protected string Name;
        protected string Sex;
        protected int Age;
        
    }

    // 派生類
    class Student : Person
    {
        private int math;
        private int english;
        private int chinese;
        public Student()
        {

        }
        public string name
        {
            set
            {
                Name = value;
            }
            get
            {
                return Name;
            }
        }

        public string sex
        {
            set
            {
                Sex = value;
            }
            get
            {
                return Sex;
            }
        }

        public int age
        {
            set
            {
                Age = value;
            }
            get
            {
                return Age;
            }
        }
        public Student(string Name,string Sex,int Age)
        {
            this.Name = Name;
            this.Sex = Sex;
            this.Age = Age;
        }

        public Student(string Name, string Sex, int Age,int math,int english,int chinese)
        {
            this.Name = Name;
            this.Sex = Sex;
            this.Age = Age;
            this.math = math;
            this.chinese = chinese;
            this.english = english;
        }
        public void SetScores(int math,int chinese,int english)
        {

            this.math = math;
            
            this.english = english;
            this.chinese = chinese;
        }

        public void GetAverage()
        {
            Console.WriteLine(this.name+"的平均分為:"+((this.chinese)+(this.english)+(this.math))/3.0);
        }

    }

    class Program
    {
        static void Main(string[] args)
        {
            Student stu1 = new Student();
            stu1.name = "蒲賀良";
            stu1.sex = "男";
            stu1.age = 21;
            stu1.SetScores(100,100,100);
            stu1.GetAverage();
            Student stu2 = new Student("小黑","男",22);
            stu2.SetScores(99,98,97);
            stu2.GetAverage();
            Student stu3 = new Student("小白", "男", 22,96,96,96);
            stu3.GetAverage();
            Console.ReadKey();
        }
    }
}
運行結(jié)果

C#程序設(shè)計實驗

這段代碼定義了一個 Person 類和一個派生類 Student,并在 Main 方法中創(chuàng)建了幾個 Student 的實例。

定義 Person 類和 Student
csharpCopy codeclass Person
{
    protected string Name;
    protected string Sex;
    protected int Age;
}

Person 類定義了三個保護(hù)字段 Name、SexAge,用于表示人的姓名、性別和年齡。

csharpCopy codeclass Student : Person
{
    private int math;
    private int english;
    private int chinese;

    // 構(gòu)造函數(shù)
    public Student()
    {

    }

    // 屬性
    public string name
    {
        set
        {
            Name = value;
        }
        get
        {
            return Name;
        }
    }

    public string sex
    {
        set
        {
            Sex = value;
        }
        get
        {
            return Sex;
        }
    }

    public int age
    {
        set
        {
            Age = value;
        }
        get
        {
            return Age;
        }
    }

    // 構(gòu)造函數(shù)重載
    public Student(string Name, string Sex, int Age)
    {
        this.Name = Name;
        this.Sex = Sex;
        this.Age = Age;
    }

    public Student(string Name, string Sex, int Age, int math, int english, int chinese)
    {
        this.Name = Name;
        this.Sex = Sex;
        this.Age = Age;
        this.math = math;
        this.chinese = chinese;
        this.english = english;
    }

    // 方法
    public void SetScores(int math, int chinese, int english)
    {
        this.math = math;
        this.english = english;
        this.chinese = chinese;
    }

    public void GetAverage()
    {
        Console.WriteLine(this.name + "的平均分為:" + ((this.chinese) + (this.english) + (this.math)) / 3.0);
    }
}

Student 類是 Person 類的派生類,它添加了私有字段 math、englishchinese,用于表示學(xué)生的數(shù)學(xué)、英語和語文成績。類中包含了構(gòu)造函數(shù)重載,用于根據(jù)不同參數(shù)創(chuàng)建 Student 類的實例。另外,類中還定義了屬性 namesexage,用于訪問和設(shè)置 Person 類中的保護(hù)字段。此外,類中還定義了 SetScores 方法,用于設(shè)置學(xué)生的成績,以及 GetAverage 方法,用于計算并輸出學(xué)生的平均分。

Main 方法中使用 Student
static void Main(string[] args)
        {
            Student stu1 = new Student();
            stu1.name = "蒲賀良";
            stu1.sex = "男";
            stu1.age = 21;
            stu1.SetScores(100,100,100);
            stu1.GetAverage();
            Student stu2 = new Student("小黑","男",22);
            stu2.SetScores(99,98,97);
            stu2.GetAverage();
            Student stu3 = new Student("小白", "男", 22,96,96,96);
            stu3.GetAverage();
            Console.ReadKey();
        }
Main 方法中使用 Student

實驗四 C#中的文件處理

題目

建立一個控制臺程序,利用所學(xué)讀寫文件類 封裝一個讀文件接口 一個 寫文件接口,并完成對文件的讀寫。

完整代碼
using System;
using System.IO;

namespace FileApplication
{
    class File_Test
    {
        private string path;
        public File_Test(string path)
        {
            this.path = path;
        }

        public void Read()
        {
            try
            {
                // 創(chuàng)建一個 StreamReader 的實例來讀取文件 
                
                StreamReader sr = new StreamReader(path, false);

                string line;

                // 從文件讀取并顯示行,直到文件的末尾 
                while ((line = sr.ReadLine()) != null)
                {
                    Console.WriteLine(line);
                }

            }
            catch (Exception e)
            {
                // 向用戶顯示出錯消息
                Console.WriteLine("The file could not be read:");
                Console.WriteLine(e.Message);
            }
            Console.ReadKey();
        }

        public void Write(string[] content)
        {
            using (StreamWriter sw = new StreamWriter(path))
            {
                foreach (string s in content)
                {
                    sw.WriteLine(s);

                }
            }

        }
    }

    class Program
    {

        static void Main(string[] args)
        {
            string Path = @"C:\Users\puheliang\Desktop\Project\CS_Project\實驗4\test.txt";
            File_Test f = new File_Test(Path);
            string[] test = { "任浩真帥", "任浩帥呆了", "任浩帥","好帥的任浩" };
            f.Write(test);
            f.Read();
        }


    }


}
運行結(jié)果

C#程序設(shè)計實驗

C#程序設(shè)計實驗

這段代碼演示了使用 StreamReaderStreamWriter 類來讀取和寫入文件。

定義 File_Test
csharpCopy codeclass File_Test
{
    private string path;

    public File_Test(string path)
    {
        this.path = path;
    }

    public void Read()
    {
        try
        {
            // 創(chuàng)建一個 StreamReader 的實例來讀取文件 
            
            StreamReader sr = new StreamReader(path, false);

            string line;

            // 從文件讀取并顯示行,直到文件的末尾 
            while ((line = sr.ReadLine()) != null)
            {
                Console.WriteLine(line);
            }

        }
        catch (Exception e)
        {
            // 向用戶顯示出錯消息
            Console.WriteLine("The file could not be read:");
            Console.WriteLine(e.Message);
        }
        Console.ReadKey();
    }

    public void Write(string[] content)
    {
        using (StreamWriter sw = new StreamWriter(path))
        {
            foreach (string s in content)
            {
                sw.WriteLine(s);
            }
        }
    }
}

File_Test 類包含了兩個方法:Read()Write(string[] content)。Read() 方法使用 StreamReader 類來讀取文件內(nèi)容并逐行輸出到控制臺。Write(string[] content) 方法使用 StreamWriter 類來將字符串?dāng)?shù)組 content 的內(nèi)容寫入到文件中。

使用 File_Test
csharpCopy codestatic void Main(string[] args)
{
    string Path = @"C:\Users\puheliang\Desktop\Project\CS_Project\實驗4\test.txt";
    File_Test f = new File_Test(Path);
    string[] test = { "任浩真帥", "任浩帥呆了", "任浩帥", "好帥的任浩" };
    f.Write(test);
    f.Read();
}

Main 方法中,我們首先定義了一個文件路徑 Path。然后,創(chuàng)建了一個 File_Test 的實例 f,并傳入文件路徑。接著,定義了一個字符串?dāng)?shù)組 test,包含了要寫入文件的內(nèi)容。調(diào)用 f.Write(test) 方法將內(nèi)容寫入文件,然后調(diào)用 f.Read() 方法讀取文件并將內(nèi)容輸出到控制臺。最后,使用 Console.ReadKey() 等待用戶按下任意鍵退出程序。

實驗五:線程技術(shù)使用

題目

建立一個控制臺程序,建立四個線程,每個線程的功能為:輸出0-9 共計10個數(shù)字,要求線程的輸出為連續(xù)輸出,借助信號量或者互斥鎖進(jìn)行實現(xiàn)。

完整代碼
using System;
using System.Threading;

namespace MultithreadingApplication
{
    class ThreadCreationProgram
    {
        static Mutex mutex = new Mutex();
        static Semaphore sem = new Semaphore(1, 1);
        
        public static void CallToChildThread01()
        {
            sem.WaitOne();
            {
                for (int i = 0; i < 10; i++)
                {

                    Console.WriteLine("thread1:" + i);
                    Thread.Sleep(5);
                }
            }
            sem.Release();


        }
        public static void CallToChildThread02()
        {
            sem.WaitOne();
            {
                for (int i = 0; i < 10; i++)
                {

                    Console.WriteLine("thread2:" + i);
                    Thread.Sleep(5);
                }
            }
            sem.Release();

        }

        public static void CallToChildThread03()
        {
            sem.WaitOne();
            {
                for (int i = 0; i < 10; i++)
                {

                    Console.WriteLine("thread3:" + i);
                    Thread.Sleep(5);
                }
            }
            sem.Release();


        }
        public static void CallToChildThread04()
        {
            sem.WaitOne();
            {
                for (int i = 0; i < 10; i++)
                {

                    Console.WriteLine("thread4:" + i);
                    Thread.Sleep(5);
                }
            }
            sem.Release();


        }
        static void Main(string[] args)
        {
            ThreadStart childref01 = new ThreadStart(CallToChildThread01);
            Thread childThread01 = new Thread(childref01);
            childThread01.Name = "Thread1";
            childThread01.Start();

            ThreadStart childref02 = new ThreadStart(CallToChildThread02);
            Thread childThread02 = new Thread(childref02);
            childThread02.Name = "Thread2";
            childThread02.Start();

            ThreadStart childref03 = new ThreadStart(CallToChildThread03);
            Thread childThread03 = new Thread(childref03);
            childThread03.Name = "Thread3";
            childThread03.Start();

            ThreadStart childref04 = new ThreadStart(CallToChildThread04);
            Thread childThread04 = new Thread(childref04);
            childThread04.Name = "Thread4";
            childThread04.Start();
            ;
            Console.ReadKey();
        }
    }
}
運行結(jié)果

C#程序設(shè)計實驗

這段代碼演示了使用多線程進(jìn)行并發(fā)操作,并使用 MutexSemaphore 實現(xiàn)線程同步。

定義線程函數(shù)
csharpCopy codepublic static void CallToChildThread01()
{
    sem.WaitOne();
    {
        for (int i = 0; i < 10; i++)
        {
            Console.WriteLine("thread1:" + i);
            Thread.Sleep(5);
        }
    }
    sem.Release();
}

public static void CallToChildThread02()
{
    sem.WaitOne();
    {
        for (int i = 0; i < 10; i++)
        {
            Console.WriteLine("thread2:" + i);
            Thread.Sleep(5);
        }
    }
    sem.Release();
}

public static void CallToChildThread03()
{
    sem.WaitOne();
    {
        for (int i = 0; i < 10; i++)
        {
            Console.WriteLine("thread3:" + i);
            Thread.Sleep(5);
        }
    }
    sem.Release();
}

public static void CallToChildThread04()
{
    sem.WaitOne();
    {
        for (int i = 0; i < 10; i++)
        {
            Console.WriteLine("thread4:" + i);
            Thread.Sleep(5);
        }
    }
    sem.Release();
}

在這里定義了四個線程函數(shù),分別是 CallToChildThread01、CallToChildThread02CallToChildThread03CallToChildThread04。每個函數(shù)都會使用 sem.WaitOne() 獲取信號量,然后執(zhí)行一個簡單的循環(huán)輸出,并使用 Thread.Sleep(5) 使線程休眠 5 毫秒,模擬一些處理時間。最后,通過 sem.Release() 釋放信號量。

創(chuàng)建并啟動線程
csharpCopy codeThreadStart childref01 = new ThreadStart(CallToChildThread01);
Thread childThread01 = new Thread(childref01);
childThread01.Name = "Thread1";
childThread01.Start();

ThreadStart childref02 = new ThreadStart(CallToChildThread02);
Thread childThread02 = new Thread(childref02);
childThread02.Name = "Thread2";
childThread02.Start();

ThreadStart childref03 = new ThreadStart(CallToChildThread03);
Thread childThread03 = new Thread(childref03);
childThread03.Name = "Thread3";
childThread03.Start();

ThreadStart childref04 = new ThreadStart(CallToChildThread04);
Thread childThread04 = new Thread(childref04);
childThread04.Name = "Thread4";
childThread04.Start();

Main 方法中,我們使用 ThreadStart 創(chuàng)建了四個線程的啟動函數(shù),并使用 Thread 類創(chuàng)建了四個線程實例 childThread01、childThread02、childThread03childThread04。我們?yōu)槊總€線程指定了名稱,然后通過調(diào)用 Start() 方法啟動線程。

主線程等待
csharpCopy code
Console.ReadKey();


childThread01.Name = "Thread1";
childThread01.Start();

ThreadStart childref02 = new ThreadStart(CallToChildThread02);
Thread childThread02 = new Thread(childref02);
childThread02.Name = "Thread2";
childThread02.Start();

ThreadStart childref03 = new ThreadStart(CallToChildThread03);
Thread childThread03 = new Thread(childref03);
childThread03.Name = "Thread3";
childThread03.Start();

ThreadStart childref04 = new ThreadStart(CallToChildThread04);
Thread childThread04 = new Thread(childref04);
childThread04.Name = "Thread4";
childThread04.Start();

Main 方法中,我們使用 ThreadStart 創(chuàng)建了四個線程的啟動函數(shù),并使用 Thread 類創(chuàng)建了四個線程實例 childThread01、childThread02childThread03childThread04。我們?yōu)槊總€線程指定了名稱,然后通過調(diào)用 Start() 方法啟動線程。

主線程等待
csharpCopy code
Console.ReadKey();

最后,使用 Console.ReadKey() 讓主線程等待用戶按下任意鍵,以保持程序運行。文章來源地址http://www.zghlxwxcb.cn/news/detail-478165.html

到了這里,關(guān)于C#程序設(shè)計實驗的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • PTA 浙大版《C語言程序設(shè)計(第4版)》題目集 參考答案(編程題)

    ???? 歡 迎 訂 閱 ???? PTA浙大版《C語言程序設(shè)計(第4版)》題目集 詳解教程 for循環(huán) 版本 while循環(huán) 版本 do-while循環(huán) 版本 while循環(huán) for循環(huán) 參考答案1 if分支 參考答案2 switch-case分支 參考答案1 #include ctype.h 參考答案2 自定義函數(shù) 本題題干建議使用動態(tài)內(nèi)存分配 參考答案1 參

    2024年02月02日
    瀏覽(105)
  • 實驗六 Java流式編程與網(wǎng)絡(luò)程序設(shè)計

    Client Server ClientPlus ServerPlus ReceiveThread 本關(guān)任務(wù):編寫應(yīng)用程序(SortArray.java),使用字節(jié)輸入/輸出流實現(xiàn)數(shù)據(jù)的保存和讀取。 Java 流功能相關(guān)的類都封裝在 java.io包中,所以要使用流類,必須導(dǎo)入java.io包。數(shù)據(jù)流是 Java 進(jìn)行 I/O 操作的對象,它按照不同的標(biāo)準(zhǔn)可以分為不同的

    2024年02月03日
    瀏覽(27)
  • C#網(wǎng)絡(luò)編程UDP程序設(shè)計(UdpClient類)

    C#網(wǎng)絡(luò)編程UDP程序設(shè)計(UdpClient類)

    目錄 一、UdpClient類? 二、示例 1.源碼 (1)Client (2)Server 2.生成 (1)先啟動服務(wù)器,發(fā)送廣播信息 (2)再開啟客戶端接聽 ???????UDP是user datagram protocol的簡稱,中文名是用戶數(shù)據(jù)報協(xié)議,它是網(wǎng)絡(luò)信息傳輸?shù)牧硪环N形式。UDP通信和TCP通信不同,基于UDP的信息傳遞更快,

    2024年04月15日
    瀏覽(24)
  • C#網(wǎng)絡(luò)編程TCP程序設(shè)計(Socket類、TcpClient類和 TcpListener類)

    C#網(wǎng)絡(luò)編程TCP程序設(shè)計(Socket類、TcpClient類和 TcpListener類)

    目錄 一、Socket類 1.Socket類的常用屬性及說明 2.Socket類的常用方法及說明 二、TcpClient類 三、TcpListener類? 四、示例 1.源碼 2.生成效果 ????????TCP(Transmission Control Protocol)是一種面向連接的、可靠的、基于字節(jié)流的傳輸層通信協(xié)議。在C#中,TCP程序設(shè)計是指利用 Socket類、T c

    2024年02月04日
    瀏覽(23)
  • 【Python程序設(shè)計】——重點題目(期末不掛科)

    【Python程序設(shè)計】——重點題目(期末不掛科)

    課本: 【例3-6】計算分段函數(shù)值。 y = { cos ? x + x 2 + 1 ( x 0 ) x x + x ( x ? 0 ) y=left{begin{array}{ll} cos x+sqrt{x^{2}+1} (x 0) \\\\ x sqrt{x+sqrt{x}} (x geqslant 0) end{array}right. y = { cos x + x 2 + 1 ? x x + x ? ? ? ( x 0 ) ( x ? 0 ) ? 【例3-7】簡化PM 2.5空氣質(zhì)量提醒: 0~35為優(yōu),35~75為良,75以

    2024年02月11日
    瀏覽(33)
  • openjudge-實用Python程序設(shè)計測驗題目1-54

    ? 目錄 001:字符菱形 002:字符三角形 003:輸出第二個整數(shù) 004:求三個數(shù)的和 005:判斷子串 006:計算(a+b)*c的值 007:反向輸出一個三位數(shù) 008:字符串交換 009:字符串中的整數(shù)求和 010:計算2的冪 011:計算多項式的值 012:奇偶數(shù)判斷 013:點和正方形的關(guān)系 014:三角形判斷 015:計算郵資 016:分段函

    2024年02月07日
    瀏覽(49)
  • 畢業(yè)設(shè)計做小程序可以做什么,基于微信小程序的畢業(yè)設(shè)計題目

    博主介紹 :《Vue.js入門與商城開發(fā)實戰(zhàn)》《微信小程序商城開發(fā)》圖書作者,CSDN博客專家,在線教育專家,CSDN鉆石講師;專注大學(xué)生畢業(yè)設(shè)計教育和輔導(dǎo)。 所有項目都配有從入門到精通的基礎(chǔ)知識視頻課程,免費 項目配有對應(yīng)開發(fā)文檔、開題報告、任務(wù)書、PPT、論文模版

    2024年02月08日
    瀏覽(28)
  • 微信小程序 畢業(yè)設(shè)計題目大全 (新穎選題)

    每年一到這個時候就會有大量的學(xué)生問,計算機(jī)專業(yè)畢業(yè)設(shè)計題目、計算機(jī)畢業(yè)設(shè)計選題等相關(guān)問題。微信小程序的選題恰巧是近年來熱門的選題類型,所以今天精心為了大家整理出了最新計算機(jī)微信小程序畢業(yè)設(shè)計參考選題都有源碼+數(shù)據(jù)庫+文檔? 是近期作品 你的選題剛好

    2023年04月25日
    瀏覽(32)
  • 浙大版PTA《Python 程序設(shè)計》題目集 參考答案

    本答案配套詳解教程專欄,歡迎訂閱: PTA浙大版《Python 程序設(shè)計》題目集 詳解教程_少俠PSY的博客-CSDN博客

    2024年02月08日
    瀏覽(21)
  • PTA(浙大版《C語言程序設(shè)計(第3版)》題目集

    PTA(浙大版《C語言程序設(shè)計(第3版)》題目集

    學(xué)習(xí)C語言程序設(shè)計的PTA題目 本題要求編寫程序,計算4個整數(shù)的和與平均值。題目保證輸入與輸出均在整型范圍內(nèi)。 輸入格式: 輸入在一行中給出4個整數(shù),其間以空格分隔。 輸出格式: 在一行中按照格式“Sum = 和; Average = 平均值”順序輸出和與平均值,其中平均值精確到小數(shù)

    2024年01月18日
    瀏覽(31)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包