码迷,mamicode.com
首页 >  
搜索关键字:switch case    ( 15339个结果
第九章 Lambda&方法引用
9.1、Lambda表达式 9.1.1、标准格式 (形式参数) -> {代码块} 9.1.2、使用前提 有一个接口并且接口中有且仅有一个抽象方法 9.1.3、常见应用 9.1.3.1、无参无返回值抽象方法练习 interface MyInter { void show(); } public cla ...
分类:其他好文   时间:2020-07-19 18:11:23    阅读次数:80
C++用Beep函数来弹钢琴
1 #include<windows.h> 2 #include<iostream> 3 #include<string> 4 using namespace std; 5 int stop=500; 6 int getFreq(char key){ 7 int freq=0; 8 switch(k ...
分类:编程语言   时间:2020-07-19 00:56:58    阅读次数:143
使用switch计算出某年某月某日是今年的第几天,输出一直是当月天数
package com.cx.Switch; import java.util.Scanner; /** * 计算出某年某月某日是今年的第几天 * 使用switch */ public class SwitchDemo { public static void main(String[] args) ...
分类:其他好文   时间:2020-07-19 00:45:16    阅读次数:130
Roman2Int
int romanToInt(char * s){ int count = 0; while (*s) { switch(*s) { case 'I': if (*(s+1) == 'V' || *(s+1) == 'X') count -= 1; else count += 1; break; c ...
分类:其他好文   时间:2020-07-19 00:43:57    阅读次数:74
学习Java的第十三天
学习内容:包装类 1.Integer型包装类 代码实现: public class Integer包装类 { public static void main(String[] args) { // TODO 自动生成的方法存根Integer a1=new Integer(15);//创建方法一Int ...
分类:编程语言   时间:2020-07-18 22:44:51    阅读次数:81
11单词统计-补
读入文件的字符串,以1-n个空格作为分隔拆分读入,全部转换为大写/小写字母(做到不区分大小写)后进行统计。若库里有该词则计数加一,否则添加字段。 package servlet; import java.io.BufferedReader; import java.io.FileNotFoundEx ...
分类:其他好文   时间:2020-07-18 22:27:12    阅读次数:84
c++ 左值引用的注意点
1. 左值引用在下列情况下会产生临时变量,函数中的引用则是临时变量的引用,并不是原变量的引用 double refcube(const double &ra){ return ra*ra*ra; } //case 1. double c1=refcube(7.0); //case2 long edg ...
分类:编程语言   时间:2020-07-18 22:13:19    阅读次数:69
codewars--kyu8-The falling speed of petals
这个题目计算花瓣落下的速度。距离一定送一个速度计算落下的时间。 如果速度送的是小于等于0 ,就返回0 . 1 def sakura_fall(v): 2 if v<=0 : 3 return 0 4 return 5*80/v 5 # your code here When it's spring ...
分类:其他好文   时间:2020-07-18 15:37:24    阅读次数:58
React Native pod install错误 SDK "iphoneos" cannot be located
给Xcode命令行工具指定路径 sudo xcode-select --switch /Applications/Xcode.app 其他命令参考 $ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/ //查 ...
分类:其他好文   时间:2020-07-18 15:36:16    阅读次数:87
【STM32F429开发板用户手册】第19章 STM32F429的GPIO应用之按键FIFO
最新教程下载:http://www.armbbs.cn/forum.php?mod=viewthread&tid=93255 第19章 STM32F429的GPIO应用之按键FIFO 本章教程为大家介绍STM32F429的GPIO应用之按键FIFO,这个方案已经在实际项目中千锤百炼,比较实用。 19 ...
分类:其他好文   时间:2020-07-18 13:50:39    阅读次数:87
15339条   上一页 1 ... 37 38 39 40 41 ... 1534 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!