一般知识问题。 [英] General knowledge question.

查看:91
本文介绍了一般知识问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何找到提供3个输入的最小日期?(它是1或2位数字)它应检查所有条件,如2月不包含30日期。

解决方案

这很简单,所以我怀疑这是作业 - 这意味着没有代码! :笑:



将它们转换为基于日期的值,随时验证条目。然后只需:

 if(a< b)then min(a,c)
else min(b,c)


How to find out a minimum date when 3 inputs are provided?(It is of 1 or 2 digit) it should check all the conditions like Feb doesn't contain 30 date.

解决方案

It's pretty simple, so I suspect this is homework - which means no code! :laugh:

Convert them to Date based values, validating the entries as you go. Then just:

if (a < b) then min (a, c)
           else min (b, c)


这篇关于一般知识问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆