- 博客(13)
- 资源 (1)
- 收藏
- 关注
原创 Docker 查看镜像信息 重启停止 删除
docker images启动 systemctl start docker守护进程重启 sudo systemctl daemon-reload重启docker服务 systemctl restart docker重启docker服务 sudo service docker restart关闭docker service docker stop关闭docker systemctl stop dockerdocker ps // 查看所有正在运行容器$ d...
2021-03-14 10:30:26
410
原创 数据类型
#include <stdio.h>void main(){ int apples = 3; int oranges = 3.0;//不好的形式,他也会转换成int类型 printf("%d,%d\n",apples,oranges); printf("%f,%f",apples,oranges);//c语言按照自己的方式去解析...
2018-11-10 14:59:29
168
原创 类型大小
#include <stdio.h>void main(){ printf(“Type int的大小为%u bytes \ n”,sizeof(int)); printf(“类型聊天的大小为%u bytes \ n”,sizeof(char)); printf(“Type long的大小为%u bytes \ n”,sizeof(long));...
2018-11-10 14:15:39
219
原创 //浮点数的舍入误差
#include <stdio.h>void main(){ float aboat = 32000.0; double abet = 2.14e9; float dip = 5.32e-5; printf(“%f可以写成%e \ n”,aboat,aboat); printf(“%f可以写成%e \ n”,abet,abet...
2018-11-10 14:08:44
1187
原创 3.5打印字符
#include <stdio.h>int main(){ char ch ; printf("please enter a charachter.\n"); scanf("%c ", &ch);//%后面不能多加空格,要不然输出错误。 printf("The code for %c is %d \n",ch,ch ); ...
2018-11-10 11:14:04
119
原创 char 类型字符常量及其初始化
#include <stdio.h>int main(void){ char greade = 'A';//编译器遇到’A‘ 时就回将其转换成相应的编码值,其中单引号是必不可少的。 char broiled ;//声明一个char类型的变量 broiled = 'T';//可以 //broiled = T ;//不可以,他把T看作一个变量;...
2018-11-10 11:04:07
4774
原创 3.4使用不正确的说明符,会造成意想不到的效果。
#include <stdio.h>int main(void){ unsigned int un = 3000000000;//int 为32位 short end = 200;//short 16 bit long big = 65537; long long verybig = 12345678908642; printf...
2018-11-10 10:51:56
173
原创 正数溢出
#include <stdio.h>int main(void){ int i = 2147483647; unsigned int j = 4294967295; printf(“%d%d%d \ n”,i,i + 1,i + 2); printf(“%u%u%u \ n”,j,j + 1,j + 2); printf(“%d...
2018-11-10 10:43:12
534
原创 3.3
#include <stdio.h>int main(void){int x = 100 ;printf("dec = %d ; octal = %o ; hex = %x \n ", x,x,x);printf(“dec = %d ; octal = %#o ; hex = %#x \ n”, x,x,x);//要显示0 和 0x 前缀必须在说明符中加入#好return...
2018-11-10 10:35:11
114
原创 3.2
#include“stdio.h”int main(void){ int ten = 10; int two = 2; printf(“做得对:”); printf(“%d减去%d是%d \ n”,十,二,十 - 二); printf(“Diing it wrong”); printf(“%d减去%d是%d \ n”,十); //...
2018-11-10 10:28:24
110
转载 3.1示例程序p33
#include “stdio.h”int main(void ){float weight ;float value;printf(“are you worth in rhodium ?/ n”);printf(“let`s check it out .\n”);printf("plese enter your weight in pounds ");scanf( " %f "...
2018-11-10 10:16:20
218
原创 输入两个证书,打印出这两个整数所制定的范围内的所有整数
#include <iostream>using namespace std ;int main(){ int num = 0 ,i = 0; cin >>num >> i ; if (num > i) { while (num -- >= i ) { ...
2018-05-30 13:38:46
396
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人