#include<stdio.h>
#include<stdlib.h>
int main()
{
printf(" O\n");
    printf("<H>\n");
printf("I I\n"); system("pause");
return 0; }

#include<stdio.h>
#include<stdlib.h>
int main()
{
printf(" O\n");
printf("<H>\n");
printf("I I\n");
printf(" O\n");
printf("<H>\n");
printf("I I\n"); system("pause");
return 0; }

#include<stdio.h>
#include<stdlib.h>
int main()
{
printf(" O O\n");
printf("<H> <H>\n");
printf("I I I I\n"); system("pause");
return 0;

}

#include<stdio.h>
#include<stdlib.h>
int main()
{
float a,b,c;
scanf("%f%f%f",&a,&b,&c); if((a+b>c)&&(a+c>b)&&(b+c>a))
printf("能构成三角形\n");
else
printf("不能构成三角形\n"); system("pause");
return 0; }

#include<stdio.h>
#include<stdlib.h>
int main()
{
char ans1,ans2;
printf("每次课前认真预习,课后及时复习了没?(输入y或Y表示有,输入n或N表示没有):");
ans1=getchar();
getchar();
printf("\n动手敲代码实践了没?(输入y或Y表示敲了,输入n或N表示没有敲):");
ans2=getchar();
if((ans1=='y'||ans1=='Y')&&(ans2=='y'||ans2=='Y'))
printf("\n罗马不是一天建成的,继续保持哦:)\n");
else
printf("\n罗马不是一天毁灭的,我们来建设吧\n"); system("pause");
return 0; }

无getchar  空格自动输出

#include<stdio.h>
#include<stdlib.h>
int main()
{
int a1,a2,a3;
char c1,c2,c3;
double x,y; scanf("%d%d%d",&a1,&a2,&a3);
printf("al=%d,a2=%d,a3=%d\n",a1,a2,a3);

getchar();
scanf("%c%c%c",&c1,&c2,&c3);
printf("cl=%c,c2=%c,c3=%c\n",c1,c2,c3); scanf("%lf%lf",&x, &y);
printf("x=%lf,y=%lf\n",x, y); system("pause");
return 0;
 
#include<stdio.h>
#include<stdlib.h> int main()
{
int year;
int s=1e9;
double y;
y=0.5+s*1.0/(3600*24*365);
year=y; printf("10亿秒约等于%d年\n",year);
system("pause");
return 0; }

#include<stdio.h>
#include<math.h>
#include<stdlib.h> int main()
{
double x,ans; scanf("%lf",&x);
ans=pow(x,365);
printf("%.2f的365次方:%.2f\n",x,ans);
system("pause");
return 0; }
#include<stdio.h>
#include<math.h>
#include<stdlib.h> int main()
{
double x,ans; while(scanf("%lf",&x)!=EOF)
{
ans=pow(x,365);
printf("%.2f的365次方:%.2f\n",x,ans);
printf("\n");
}
system("pause");
return 0; }

#include<stdio.h>
#include<math.h>
#include<stdlib.h> int main()
{
double c,f; while(scanf("%lf",&c)!=EOF)
{
f=9*c/5+32;
printf("摄氏度c=%.2f时,华氏摄氏度f=%.2f\n",c,f);
printf("\n");
}
system("pause");
return 0; }

#include<stdio.h>
#include<math.h>
#include<stdlib.h> int main()
{
float a,b,c,s,area; while(scanf("%f%f%f",&a,&b,&c)!=EOF)
{
s=(a+b+c)/2.0;
area=sqrt(s*(s-a)*(s-b)*(s-c));
printf("三角形的面积是:%.3f",area);
printf("\n");
}
system("pause");
return 0; }

实验1 c语言开发环境使用和数据类型 运算符 表达式的更多相关文章

  1. 实验1 C语言开发环境使用和数据类型、运算符、表达式

    ♦ 实验结论 PART 1 验证性内容 问题: 1.结尾没有加“:”时回车到下一行的时候再输入下一行的语言首字对齐方式会发生变化,可以对上一行进行检查. (这一点需要在不同软件里面试一下,在机房里的软 ...

  2. 实验1 C 语言开发环境使用和数据类型、运算符、表达式

    # include <stdio.h> int main() { int x; printf("x:\n"); scanf("%d",&x) ...

  3. 实验1 C语言开发环境使用和数据类型,运算符,表达式

    part :验证性内容 .输出学号. #include<stdio.h> int main(void){ printf("); ; } .输入两个整数,求它们的乘积. #incl ...

  4. 实验1“C语言开发环境使用和数据类型、运算符、表达式”总结与体会

    一.实验结论 1.判断奇偶 // 程序功能: // 要求用户从键盘输入一个整数,判断其是奇数还是偶数 #include <stdio.h> int main() { int x; prin ...

  5. 实验1 C语言开发环境使用和编程初体验

    #include <stdio.h> #include <stdlib.h> int main() { printf ("202083290273\n2020 ,wh ...

  6. 实验1 C语言开发环境和数据类型、运算符、表达式

    #include <stdio.h> int main () { int x; printf("输入一个整数:\n"); scanf("%d",&a ...

  7. 实验1c语言开发环境使用和数据类型,运算符和表达式

    /*this is first c program*/ # include<stdio.h> int main() { printf("Hello Mars!"); ; ...

  8. 实验1C语言开发环境使用和数据类型、运算符、表达式

    # include <stdio.h> int main() { char ch; printf("输入一个字符:\n"); scanf("%c", ...

  9. 实验1 C语言开发环境...

    #include<stdio.h> int main(){ int days; printf("输入一个整数:\n") ; scanf("%d",& ...

  10. 实验1 C语言环境使用和数据类型 运算符 表达式

    Part1 经过练习我发现自己经长会漏掉分号,有时输入法不同,打出来的括号前后不同,还有转义字符的使用,大小写转化之间的表达.还有打字速度比较慢. Part2 #include<stdio.h& ...

随机推荐

  1. C++ STL 容器-Vector类型

    C++ STL 容器-Vector类型 std::vector是C++标准库中的一个动态数组容器,它提供了随机访问迭代器,因此你可以像使用普通数组一样使用vector. vector容器可以动态地增长 ...

  2. Java 多线程------例子(2) --创建 三个窗口 买票 总票数为 100张 使用实现Runnabel接口的方式

    1 package com.bytezero.threadexer; 2 3 /** 4 * 创建 三个窗口 买票 总票数为 100张 使用实现Runnabel接口的方式 5 * 6 * @autho ...

  3. BIM+物联网,打开数字孪生世界之门

    建筑行业一直在寻求创新和提高效率的方法,以满足日益复杂和迫切的建筑需求.近年来,数字孪生和物联网等新兴技术的崛起为建筑信息模型(BIM)应用带来了全新的可能性.数字孪生技术通过将实体建筑与其虚拟模型连 ...

  4. apt-get upgrade 和apt-get dist-upgrade区别

    kali  linux系统或者 debian等系统 以及centos  在系统升级后经常会出现系统无法启动,或者启动之后GUI功能没有的问题: 笔记:   区别这两种用法 apt-get update ...

  5. rst文件查看(Sphinx)

    reStructuredText ( RST . ReST 或 reST )是一种用于文本数据的文件格式,主要用于 Python 编程语言社区的技术文档. 在下载了别人的Python源文件里面有rst ...

  6. 使用fastJson中的JSONObject对象简化POST请求传参-2022新项目

    一.业务场景 Java项目开发中,经常会用到远程调用,不管是POST请求,Feign远程调用,还是使用Resttemplate中的POST方法等等都需要传递参数. 可是如何更好的传递参数呢?之前自己开 ...

  7. Python 动态网页Fetch/XHR爬虫——以获取NBA球员信息为例

    Python 动态网页Fetch/XHR爬虫--以获取NBA球员信息为例 动态网页抓取信息,一般利用F12开发者工具-网络-Fetch/XHR获取信息,实现难点有: 动态网页的加载方式 获取请求Url ...

  8. Python Numpy 中的打印设置函数set_printoptions

    一 概述 np.set_printoptions()用于控制Python中小数的显示精度. 二 解析 np.set_printoptions(precision=None, threshold=Non ...

  9. 前端 nodejs 命令行自动调用编译 inno setup 的.iss文件

    项目中需要把前端代码用 electronjs 打包成 windows 安装包 使用的是开源的 inno setup 制作安装包 官网 虽然 ElectronJS 也有 electron-builder ...

  10. 学会Promise,看这里!!!

    前言 众所周知,在JavaScript的世界中,代码都是单线程执行的.由于这个原因,JavaScript中的耗时操作,如网络操作.浏览器事件等,都需要异步执行.这也导致在JavaScript中异步操作 ...