码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果
java大数类操作以及应用(UVA)
首先,先看看java大数的基本操作 Ⅰ基本函数: 1.valueOf(parament); 将参数转换为制定的类型   比如 int a=3;   BigInteger b=BigInteger.valueOf(a);   则b=3;   String s=”12345”;   BigInteger c=BigInteger.valueOf(s);   则c=12345; ...
分类:编程语言   时间:2015-03-28 14:25:17    阅读次数:234
利用if else 来计算车费
static void Main(string[] args) { while (true) { double x,y; Console.Write("请输入坐车的距离:"); x = Convert.ToDouble(Console.ReadLine()); if (x>0&&x 3 && x ....
分类:其他好文   时间:2015-03-28 14:15:30    阅读次数:117
HDU 3374 String Problem
最长回文子串,学习了一下manacher算法 #include #include char s[1000005]; int next[1000005]; int n; //i,j两个指针所指的位置可以保证已经是该指针之前的串里,最优的了 int min(int a,int b){ if(a<b) return a; return b; } int max(int a,int b...
分类:其他好文   时间:2015-03-28 13:04:30    阅读次数:135
出租车车费计算
3KM以内8元超过3KM每公里1.2元超过5KM每公里1.5元根据坐车的距离计算出车费 static void Main(string[] args) { while (true) { double i,l, m1...
分类:其他好文   时间:2015-03-28 13:00:11    阅读次数:183
条件都判断完才能判断的最基础的有车有房有钱才能结婚的判断条件
static void Main(string[] args) { while (true) { Console.Write("请问有没有房子?:"); string a = Console...
分类:其他好文   时间:2015-03-28 12:58:46    阅读次数:93
委托, 泛型委托,Func<T>和Action<T>
使用委托来做一些事情,大致思路是: 1、定义声明一个委托,规定输入参数和输出类型。2、写几个符合委托定义的方法。3、把方法列表赋值给委托4、执行委托 internal delegate int MyDelegate(); class Program { static void Main(string...
分类:其他好文   时间:2015-03-28 12:56:10    阅读次数:111
String Formatting in C#
原文地址 http://blog.stevex.net/string-formatting-in-csharp/When I started working with the .NET framework, one thing puzzled me. I couldn’t find sprintf(...
分类:Windows程序   时间:2015-03-28 12:54:55    阅读次数:212
ArrayList string[] string
1、ArrarList 转换为 string[] : ArrayList list = new ArrayList(); list.Add("aaa"); list.Add("bbb"); string[] arrString = (string[])list.ToArray(typeof(...
分类:其他好文   时间:2015-03-28 12:49:23    阅读次数:139
华为(C++实现字符串压缩程序)
#include #include using namespace std; void string_zip(string input,string &output) { if(input.empty()) return ; char last='\0'; char current; int count=0; for(int i=0;i<input.size();++i) { ...
分类:编程语言   时间:2015-03-28 11:36:29    阅读次数:473
JAVA学习笔记(三十五)- 随机读写文件 RandomAccessFile
RandomAccessFile类/* * RandomAccessFile类,随机读写文件 * * 数据分段要有规律,每段大小相等,可以将每段数据设置为较大的值,足以存在每一个段的数据 * */ public class Test04 { public static void main(String[] args) throws IOException { /...
分类:数据库   时间:2015-03-28 11:36:05    阅读次数:163
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!