![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
面试、笔试题
the_sea1
这个作者很懒,什么都没留下…
展开
-
题目:求年龄
网友年龄 某人新认识一网友。 当问及年龄时,他的网友说: “我的年龄是个2位数,我比儿子大27岁, 如果把我的年龄的两位数字交换位置,刚好就是我儿子的年龄” 请你计算:网友的年龄一共有多少种可能情况? 实例:30岁 请填写表示可能情况的种数。 代码:求100以内的情况 int main() { int count = 0; int number[2] = { 0 }; int j...原创 2019-10-29 10:58:17 · 205 阅读 · 0 评论 -
求两个字符串最大公共子字符串长度并输出
求两个字符串最大公共子字符串长度并输出: 1.常用方法: 代码如下: #define _CRT_SECURE_NO_WARNINGS #include "iostream" #include "string" #include "algorithm" using namespace std; int commonStrlen(string s1, string s2) { if (s...原创 2019-10-24 11:01:15 · 1549 阅读 · 1 评论