- 博客(16)
- 资源 (4)
- 收藏
- 关注
原创 输出随机数1到511*511序列
编写一个控制台应用,实现输出一个从1开始到511*511长度的随机数序列。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace RAndom{ class Program { static void Main(string.........
2014-09-28 23:02:19 1164
原创 计算物体密度
编写C#控制台应用程序,对第2题进行扩展,从PhysicalObject中派生出移动物体类MovingObject,在其中增加物体的速度信息,并实现物体动量和动能的计算。 提示:动量计算公式p=m*v(物体质量*速度) 动能计算公式p=m*v*v/2using System;using System.Collections.Generic;using System.........
2014-09-28 23:00:37 1083
原创 猜数字游戏
********5.随机给出一个0至99(包括0和99)之间的数字,然后让你猜是什么数字。你可以随便猜一个数字,游戏会提示太大还是太小,从而缩小结果范围。经过几次猜测与提示后,最终推出答案。 提示:用Random类的Next方法产生数据using System;using System.Collections.Generic;using System.Linq;using Syst
2014-09-28 22:56:41 955
原创 字符串的各种操作
3.编写一个控制台应用。输入一组整数,输出所有的奇数。 提示:使用字符串的Split函数4.输入一个由若干字符组成的字符串,输出其中的大写字母、小写字母、数字和其他字符的个数。 提示:使用ToCharArray函数using System;using System.Collections.Generic;using System.Linq;using System.Text;
2014-09-28 22:54:30 763
原创 将字符串倒序
.继续在该类中编写一下方法,名称为Reconvert,参数一个,但可以是字符串、整数、单精度、双精度,方法功能返回参数的逆序。如Reconvert(6221982)返回值为2891226。提示:将string转换为Char char[] c=strS.ToCharArray()using System;using System.Collections.Generic;usi
2014-09-28 22:51:59 863
原创 求参数出现的次数
编写一个名称为MyClass一个类,在该类中编写一个方法,名称为CountChar,返回值为整型,参数两个,第一个参数可以是字符串、整数、单精度、双精度,第二个参数为字符,方法功能返回第二个参数在第一个参数中出现次数。如CountChar("6221982",'2')返回值为3。using System;using System.Collections.Generic;using Sys
2014-09-28 22:49:42 901
原创 工资类
在员工管理系统中,有普通员工,经理,董事三种角色,公司所有的员工都有员工Id,员工名字,员工基本薪水(salary),请假天数(days);它们的区别是计算工资方式不一样。具体工资计算办法:所有人工资扣除部分:如果请假小于5天,基本工资发75%,大于5天,基本工资发50% ;A、普通员工工资=基本工资+住房补贴(基本工资的0.1)+交通补贴(基本工资的0.3);B、经理的工资=基本工资
2014-09-28 22:41:32 1217
原创 输入学号和姓名,对不存在的学号加到hashtable类的实例中,对存在学号给出提示
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace ConsoleApplication1{ class Program { static void M
2014-09-18 09:25:20 1545
原创 图书类
public class Book { private String bookId; private String bookName; private String author; private String publisher; private String price; public
2014-09-18 08:46:56 2330
原创 简单四则运算
class Arith{ private int num1,num2; Arith(){ } Arith (int a,int b) { this.num1=a; this.num2=b; } public int getNum1()
2014-09-18 08:42:57 829
原创 猜数字游戏
import java.util.Random;import java.util.Scanner;public class Number { /** * @param args */ public static void main(String[] args) { // TODO Auto-ge nerated method stub Sys
2014-09-18 08:42:09 760
原创 判断字符串中A出现的个数,及单词的个数
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Stringing{ class Program { static void Main(string[] args) {
2014-09-18 08:40:47 1436
原创 求两个数之间的素数+一个数的各位之和+判断回文数
#include #include #includeusing namespace std;int main(){ int a,k,m=0,c=1,n=0; bool prime; cout<<"please input n"<<endl; cin>>n; cout << "the prime is:" << endl; for(c=1;
2014-09-04 22:00:38 1179
原创 判断是否为闰年
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace qqqqqq{ class Program { static void Main(string[] args) {
2014-09-04 21:58:16 759
原创 判断是否为回文数+求一个序列的第30个数
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _11111{ class Program { static void Main(string[] args) { string c
2014-09-04 21:56:16 844
原创 求水仙花数
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace p1{ class Program { static void Main(string[] args) { int a=0,b=0,
2014-09-04 21:52:33 1031
国家电子健康卡建设指南(2.5);居民健康卡跨域主索引系统技术指引
2020-12-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人