码迷,mamicode.com
首页 >  
搜索关键字:printf    ( 15030个结果
c语言4-6 输出小于输入值的所有正偶数
输出小于输入值的所有正偶数。 1、while语句 #include <stdio.h> int main(void) { int i = 2, j; puts("please input an integer."); printf("j = "); scanf("%d", &j); while ( ...
分类:编程语言   时间:2021-04-20 15:40:50    阅读次数:0
C 数组下标计算
int main(int argc,char * argv[]) { int arry[] = { 1,2,3 }; //大小下标计算 (int)arry+sizeof(int)*n arry[2] = 30; printf("%x", &arry[2]); printf("%x", (int)ar ...
分类:编程语言   时间:2021-04-20 15:10:21    阅读次数:0
HAL库使用printf
用stm32cubemx配置好串口功能之后,想要使用printf函数进行打印输出的话,还需要自己添加一个重定向函数。 1 #ifdef __GNUC__ 2 /* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Smal ...
分类:其他好文   时间:2021-04-20 15:06:54    阅读次数:0
十进制转十六进制
代码: #include <stdio.h> #include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int ma ...
分类:其他好文   时间:2021-04-20 14:10:46    阅读次数:0
二分法的拓展与应用
#include<cstdio> const double eps = 1e-5; double f(double x) { return x * x; } double calSqrt() { double mid,left=1,right=2; while (right - left > eps ...
分类:其他好文   时间:2021-04-20 14:03:49    阅读次数:0
变长参数传递与两个函数之间
1 // 变长参数传递与两个函数之间 2 template <class... Args> 3 void myTest(Args... args) { 4 printf("%d,%d,%d,%d", args...); 5 } 6 int main() { 7 myTest(1, 2, 3, 4); ...
分类:其他好文   时间:2021-04-19 15:50:56    阅读次数:0
GO手写读取ini配置
前言: 手写GO用反射读取ini配置文件。 实例代码: package main import ( "errors" "fmt" "io/ioutil" "reflect" "strconv" "strings" ) // ini配置文件解析器 // MysqlConfig MySQL配置结构体 t ...
分类:其他好文   时间:2021-04-19 15:03:58    阅读次数:0
go语言的时间获取
该文可以快速在Go语言中获得时间的计算。 在Go中获取时间 如何获取当前时间 now := time.Now() fmt.Printf("current time is :%s", now) current time is :2009-11-10 23:00:00 +0000 UTC m=+0.00 ...
分类:编程语言   时间:2021-04-14 12:35:07    阅读次数:0
因子分解
输入一个数,分解成其质因子 1 #include<stdio.h> 2 3 int main() 4 { 5 int val,temp; 6 scanf("%d", &val); 7 printf("%d=1*", val); 8 temp = val; 9 for (int i = 2; i < ...
分类:其他好文   时间:2021-04-14 11:57:55    阅读次数:0
c语言入门教程–-5判断语句
#include<stdio.h> int main() { int a=1; int b=1; if(a==b) { printf("相等"); } else { printf("不相等"); } return 0; } ...
分类:编程语言   时间:2021-04-13 12:15:37    阅读次数:0
15030条   上一页 1 ... 7 8 9 10 11 ... 1503 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!