码迷,mamicode.com
首页 >  
搜索关键字:状态机 有穷自动机 printf    ( 16150个结果
C,C++语法基础 | 判断语句
判断语句 printf的格式输出 可以使用%5d这样来补空格,还有就是%05d这样子可以补0,还有%-5d是从右边补0 int a = 1,b=12,c=123; printf("%5d\n",a); // 1 printf("%05d\n",a); // 00012 printf("%-5d\n" ...
分类:编程语言   时间:2020-11-08 17:27:35    阅读次数:17
判断三角形的形状
#include<stdio.h> int main(){ unsigned int a, b, c; while(scanf("%d %d %d",&a, &b, &c)) { if(a+b>c && a+c>b && b+c>a){ if(a==b && b==c && a==c) printf ...
分类:其他好文   时间:2020-11-07 17:17:00    阅读次数:16
集合相似度-easy-stl-set
#include<iostream> #include<cstdio> #include<set> #define MAXSIZE 51 using namespace std; set<int> s[MAXSIZE];/*建立set数组,自动除去重复的并且升序排好,然后利用count函数即可,知识 ...
分类:其他好文   时间:2020-11-07 16:42:41    阅读次数:18
喝汽水,1瓶汽水1元,2个空瓶可以换一瓶汽水,给20元,可以多少汽水
第一种方法#include<stdio.h>#include<Windows.h>#pragmawarning(disable:4996)intQishui(intn){inttotal=0;total+=n;for(;n>=2;n=n/2+n%2){total+=n/2;}returntotal;}intmain(){intmoney=0;printf("
分类:其他好文   时间:2020-11-07 16:25:52    阅读次数:17
实验二
// ex1.cpp #include <stdio.h> int main(){ int a=5, b=7, c=100, d, e, f; d = a/b*c; e = a*c/b; f = c/b*a; printf("d=%d, e=%d, f=%d\n",d,e,f); return 0; ...
分类:其他好文   时间:2020-11-06 02:51:26    阅读次数:55
封装不同的打印
封装打印,区分颜色,显示文件名,函数名和行号 01_test_printf.c #include <stdio.h> #define ANSI_COLOR_RED "\x1b[31m" #define ANSI_COLOR_GREEN "\x1b[32m" #define ANSI_COLOR_YE ...
分类:其他好文   时间:2020-11-06 02:32:36    阅读次数:17
【C】Re01
一、GCC分布编译 xxx.c文件经历的一系列编译过程: #include <stdio.h> int main() { printf("Hello, World!\n"); return 0; } /* * gcc * * GCC的分布编译 * xxx.c文件 -> xxx.exe可执行文件 * ...
分类:其他好文   时间:2020-11-06 01:54:59    阅读次数:16
实验2
// ex1.cpp #include <stdio.h> int main() { int a=5, b=7, c=100, d, e, f; d = a/b*c; e = a*c/b; f = c/b*a; printf("d=%d, e=%d, f=%d\n",d,e,f); return 0 ...
分类:其他好文   时间:2020-11-06 01:25:28    阅读次数:20
学习C语言第六天
C语言是一门结构化的程序设计语言1.顺序结构2.选择结构3.循环结构什么是语句?C语言中由一个分号;隔开的就是一条语句比如printf(“hehe”);1+2;分支语句(选择结构)if语句1if(表达式)单分支语句;如果if是真那么语句执行否则什么都不执行#include<stdio.h>intmain(){inta=0;printf("你打了多少行有效代码?\n"
分类:编程语言   时间:2020-11-06 00:48:55    阅读次数:22
考前算法总结
最短路 SPFA #include <bits/stdc++.h> using namespace std; #define N 10001 #define M 500001 struct node{ int to,w,next; }edge[M]; int cut=0; int head[N]; ...
分类:编程语言   时间:2020-11-04 18:47:58    阅读次数:18
16150条   上一页 1 ... 29 30 31 32 33 ... 1615 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!