
c primer plus
工科男技术男
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 · 228 阅读 · 0 评论 -
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 · 134 阅读 · 0 评论 -
//浮点数的舍入误差
#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 · 1213 阅读 · 0 评论 -
类型大小
#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 · 233 阅读 · 0 评论 -
数据类型
#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 · 188 阅读 · 0 评论