码迷,mamicode.com
首页 >  
搜索关键字:calculate    ( 959个结果
LeetCode() Basic Calculator 不知道哪里错了
class Solution {public: int calculate(string s) { stack num; stack symbol; for(int i=0;i='0'&&s[i]'9'){ num.push(stoi(s.substr(i,j-i))); i=j-1; break;...
分类:其他好文   时间:2016-01-08 13:15:13    阅读次数:110
计算器 UITextField
判断UITextField的输入的内容不能为空:(注意:判断UITextField有没有输入字符用字符的length来判断)- (IBAction)calculate { // 1.拿到用户输入的第一个数字 NSString *num1String = self.num1Field.te...
分类:其他好文   时间:2016-01-03 00:21:16    阅读次数:158
WPF
Calculate计算类;public class Calculate { private double x;//第一个数 public double X//封装字段 { get { return x; } ...
分类:Windows程序   时间:2015-12-28 20:16:40    阅读次数:264
Swift中的单元测试
要测试的类import Cocoaclass SimpleInterest: NSObject{ func calculate(loanAmount: Double, var interestRate: Double,years: Int) ->Double { inter...
分类:编程语言   时间:2015-12-26 15:07:41    阅读次数:288
WPF应用
代码 private void button1_Click(object sender, RoutedEventArgs e) { calculate sa = new calculate(int.Parse(textBox1.Text),int.Parse(...
分类:Windows程序   时间:2015-12-13 23:36:14    阅读次数:255
ACM 1001
Problem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... +...
分类:其他好文   时间:2015-12-09 00:02:25    阅读次数:315
1088. Rational Arithmetic (20)
For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Spe...
分类:其他好文   时间:2015-12-06 13:03:13    阅读次数:256
1081. Rational Sum (20)
Given N rational numbers in the form "numerator/denominator", you are supposed to calculate their sum.Input Specification:Each input file contains one...
分类:其他好文   时间:2015-12-06 12:50:50    阅读次数:120
[LeetCode]Basic Calculator II
public class Solution { public int calculate(String s) { Stack stack = new Stack(); s = s.replace(" ", ""); int length = s.len...
分类:其他好文   时间:2015-12-06 09:56:33    阅读次数:152
java学习笔记-设计模式14(策略模式)
意图 定义一系列的算法,把它们一个个封装起来, 并且使它们可相互替换。本模式使得算法可独立于使用它的客户而变化。 策略模式多用在算法决策系统中,外部用户只需要决定用哪个算法即可。public interface ICalculator { public int calculate(St...
分类:编程语言   时间:2015-12-04 12:41:09    阅读次数:124
959条   上一页 1 ... 56 57 58 59 60 ... 96 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!