8 1 #include<stdio.h> 2 int num[100]; 3 int main() 4 { 5 int x; 6 int cnt = 0; 7 scanf("%d", &x); 8 while(x) { 9 num[++cnt] = x % 10; 10 x = x / 10; 1 ...
分类:
编程语言 时间:
2020-11-24 12:15:10
阅读次数:
9
#include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, ...
分类:
其他好文 时间:
2020-11-24 12:14:01
阅读次数:
6
Base64代码 base64.c #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <fcntl.h> // bindata待编码数据buffer base64 编码后数据 ...
分类:
其他好文 时间:
2020-11-24 12:13:36
阅读次数:
7
交换值#include<stdio.h>intmain(){inta=1;intb=2;intc=0;printf("交换前a=%db=%d\n",a,b);c=a;a=b;b=c;printf("交换后a=%db=%d\n",a,b);return0;}
分类:
其他好文 时间:
2020-11-23 12:28:40
阅读次数:
4
什么是内存对齐还是用一个例子带出这个问题,看下面的小程序,理论上,32位系统下,int占4byte,char占一个byte,那么将它们放到一个结构体中应该占4+1=5byte;但是实际上,通过运行程序得到的结果是8byte,这就是内存对齐所导致的。//32位系统#include<stdio.h>struct{intx;chary;}s;intmain(){printf("%d\n",s
分类:
编程语言 时间:
2020-11-23 12:26:53
阅读次数:
7
实验任务4#include<stdio.h> #include<math.h> int main() { int n,a,b,i,s; printf("Enter a number:"); scanf("%d",&n); while(n){ i=0; s=0; while(n!=0){ a=n%10 ...
分类:
其他好文 时间:
2020-11-23 12:22:09
阅读次数:
3
#include "stdafx.h" #include <stdio.h> int main(int argc, char* argv[]) { char a,b,c,d,e; scanf("%c%c%c%c%c",&a,&b,&c,&d,&e); putchar(a); putchar(b); ...
分类:
其他好文 时间:
2020-11-23 12:14:20
阅读次数:
5
#include <math.h> #include <stdio.h> int main() { float a,b,c,x1,x2; float delta,real,imag; printf("Enter a,b,c"); while(scanf("%f%f%f",&a,&b,&c) !=EO ...
分类:
其他好文 时间:
2020-11-23 11:57:34
阅读次数:
4
#一、说明 **1.**该系统只具备面向用户的基本功能(如开户、销户、存款、取款、转账、余额查询功能); **2.**该系统用C语言实现。 #二、ATM系统模块化代码 头文件& 全局变量 #include <stdio.h> #include <stdlib.h> #include <string. ...
分类:
其他好文 时间:
2020-11-21 12:43:16
阅读次数:
45
任务一 #include<stdio.h> #include<math.h> int main(){ float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a ...
分类:
其他好文 时间:
2020-11-21 12:42:08
阅读次数:
28