
c#基础
小小小卢c
这个作者很懒,什么都没留下…
展开
-
c#//创建一个包含 10 个元素的 int 一维数组, 从键盘接收其值;当用户输入非法时,提示重新输入;暂时没有实现,。
c#//创建一个包含 10 个元素的 int 一维数组, 从键盘接收其值;当用户输入非法时,提示重新输入;暂时没有实现,。原创 2022-04-08 22:32:14 · 1613 阅读 · 0 评论 -
c#求以下表达式的值,写出您想到的一种或几种实现方法: 1-2+3-4+……+m
求以下表达式的值,写出您想到的一种或几种实现方法: 1-2+3-4+……+m原创 2022-04-07 16:35:06 · 847 阅读 · 0 评论 -
c#使用递归算法来实现计算1+2+3+4+…+100的结果
c#使用递归算法来实现计算1+2+3+4+…+100的结果原创 2022-04-07 16:35:46 · 1883 阅读 · 0 评论 -
c#接口类interface
c#接口类interface,简单来说就是前辈的想法后辈来具体实现。原创 2022-04-05 21:16:09 · 327 阅读 · 0 评论 -
c#小卢与小猪
小卢与小猪原创 2022-04-04 22:34:50 · 2797 阅读 · 0 评论 -
c#结构体基础
c#结构体基础原创 2022-04-03 18:50:16 · 76 阅读 · 0 评论 -
c#通过虚方法 area() 来计算不同形状图像的面积
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Day024_1{ class Shape { protected int height, width; public Shape(int a = 0, int b = 0) { ...原创 2022-04-02 20:18:09 · 934 阅读 · 0 评论 -
c#的函数调用
using System;namespace LineApplication{ class Line { private double length; // 线条的长度 public Line(double len) // 参数化构造函数 { Console.WriteLine("对象已创建,length = {0}", len); length = len; } .原创 2022-04-01 21:24:07 · 2111 阅读 · 0 评论 -
【c#提供给输出参数的变量不需要赋值。当需要从一个参数没有指定初始值的方法中返回值时,输出参数特别有用】
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Day022_1{ class MyClass { public void Returnreturn(out int x, out int y)//用out在void的作用下输出x,y { .原创 2022-03-31 16:30:10 · 838 阅读 · 0 评论 -
c#纸张可以无限次对折,纸张厚度为0.07毫米。问多少次对折至少可以超过8848?
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Day021_1{ class Program { static void Main(string[] args) { //纸张可以无限次对折,纸张厚度为0.07毫米。问多少次对折至.原创 2022-03-30 11:43:20 · 904 阅读 · 0 评论 -
c#有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?
有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?原创 2022-03-29 10:49:24 · 1153 阅读 · 0 评论 -
【无标题】c#有一个字符串 “I am a good man“,设计一个函数,返回 “man good a am I“。
c#有一个字符串 "I am a good man",设计一个函数,返回 "man good a am I"。原创 2022-03-29 10:23:16 · 525 阅读 · 0 评论 -
c#逆序打印“I am a student“
请将字符串"I am a student"按单词逆序输出 如"student a am I"原创 2022-03-28 21:05:49 · 947 阅读 · 0 评论 -
c#随机数组
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Day018{ class Program { static void Main(string[] args) { //产生一个int数组,长度为100,并向其中随机插入1-100。.原创 2022-03-27 19:31:42 · 1403 阅读 · 1 评论 -
c#把数组内的元素合并转换输出
c#把数组内的元素合并转换输出原创 2022-03-26 14:22:21 · 558 阅读 · 0 评论 -
c#求阶乘
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Day016{ class Program { public class Recursion //递归 { public int Factorial(int x) //返回一个int.原创 2022-03-25 22:39:11 · 559 阅读 · 0 评论 -
c#冒泡排序
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Day016{ class Program { static void Main(string[] args) { //冒泡排序 int[] sum = { .原创 2022-03-25 13:10:40 · 547 阅读 · 0 评论 -
c#斐波那契数列
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Day015{ class Program { public class FibClass { public int Fib(int x) { .原创 2022-03-24 12:37:02 · 585 阅读 · 0 评论 -
c#求质数(简化版)
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Day014{ class Program { static void Main(string[] args) { //求质数 :只能被1和本身整除的数 fo.原创 2022-03-23 11:38:54 · 1521 阅读 · 0 评论