- 博客(24)
- 收藏
- 关注
原创 c#//创建一个包含 10 个元素的 int 一维数组, 从键盘接收其值;当用户输入非法时,提示重新输入;暂时没有实现,。
c#//创建一个包含 10 个元素的 int 一维数组, 从键盘接收其值;当用户输入非法时,提示重新输入;暂时没有实现,。
2022-04-08 22:32:14
1608
原创 c#求以下表达式的值,写出您想到的一种或几种实现方法: 1-2+3-4+……+m
求以下表达式的值,写出您想到的一种或几种实现方法: 1-2+3-4+……+m
2022-04-07 16:35:06
842
原创 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
928
原创 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
2106
原创 【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
832
原创 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
899
原创 c#有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?
有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少?
2022-03-29 10:49:24
1148
原创 【无标题】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
原创 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
1397
1
原创 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
557
原创 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
546
原创 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
583
原创 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
1513
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人