码迷,mamicode.com
首页 >  
搜索关键字:visaul stdio    ( 10042个结果
试题 算法提高 欧拉函数
思路: 代码: #include<iostream> #include<stdio.h> using namespace std; typedef long long ll; int main(){ ll n; cin>>n; ll res=n; for(ll i=2;i<=n/i;i++){ if ...
分类:编程语言   时间:2020-11-11 16:33:00    阅读次数:9
BFS模板
bfs 模板 bfs Code 2_bfs.rar:https://www.90pan.com/b2125384 密码:tjpl 文件名 bfs.cpp 分数 1 初始化代码 #include <stdio.h> #include <queue> using namespace std; int n ...
分类:其他好文   时间:2020-11-11 16:32:36    阅读次数:8
10-3
数组不完全初始化:后面五个值默认为零#define_CRT_SECURE_NO_WARNINGS#include<stdio.h>intmain(){intarr[10]={1,2,3,4,5};//不完全初始化,后面五个值默认为零return0;}intmain(){chararr[10]={"a","b","c"};//不
分类:其他好文   时间:2020-11-11 16:03:36    阅读次数:4
C语音,函数padd的功能是调整pa指向的链表中结点的位置,使得所有x值为偶数的结点出现在链表的前半部,所有x值为奇数的结点出现在链表的后半部。
#include <stdio.h> #include <stdlib.h> typedef struct node {int x; struct node *next; }NODE; NODE *padd(NODE *pa) { NODE *p1,*p2,*p; p1=p2=pa; while(p ...
分类:其他好文   时间:2020-11-10 11:42:48    阅读次数:24
11.8~11.14每周题目
题目 1054: [二级C语言]计算素数和 #include <stdio.h> #include <math.h> int isprime(int x)//判断素数,返回1表示x为素数 { if(x==1)return 1; int i,emp=sqrt(x); for(i=2;i<=emp;++ ...
分类:其他好文   时间:2020-11-10 11:16:27    阅读次数:6
判断三角形的形状
#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
DSA 2020 8.1-8.10
8.1 PAT dfs+dijkstra 重做 // PAT 1018 #include<stdio.h> #include<vector> #include<map> #include<algorithm> using namespace std; const int N = 600; const ...
分类:其他好文   时间:2020-11-07 16:44:48    阅读次数:17
喝汽水,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
10042条   上一页 1 ... 35 36 37 38 39 ... 1005 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!