#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. [前端] html和原生js实现鼠标拖动和触摸拖动以及点击后跟随鼠标移动

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. 【夏令时】用@JsonFormat(pattern = “yyyy-MM-dd“)注解,出生日期竟然年轻了一天

    前言 缘由 用@JsonFormat(pattern = "yyyy-MM-dd")注解,出生日期竟然年轻了一天 艺术源于生活,bug源于开发. 起因是艰苦奋战一个月,测试及验收都 ...

  3. ConfigMap挂载与Subpath在Nginx容器中的应用

    本文分享自华为云社区<nginx.conf以configmap文件形式挂载到nginx容器中以及subpath使用场景>,作者:可以交个朋友. 背景 nginx.conf通过configm ...

  4. Educational Codeforces Round 145 (Rated for Div. 2)C. Sum on Subarrays(构造)

    很意思的一道构造题 题意:给一个\(n.k\),让构造长度为n的数组满足,子数组为整数的个数为k个,负数的为\(k-(n+1)* n/2\),每个数的范围为\([-1000,1000]\) 这种构造题 ...

  5. 线上RocktMQ重复投递半事务消息故障排查

    1. 故障现象 2020-11-18 10:40开始,业务线反馈线上收到大量的重复MQ半事务消息,导致容器资源消耗急剧攀升,经查看MQ日志,发现broker-b的Master服务,报出大量半事务消息回 ...

  6. deepin版的微信无法启动

    我在网上找了半天的了,出现问题的原因应该是deepin-wine的问题: 既然是deepin-wine出了问题,那重装一下就好了,嗯~ 我直接,yay!结果发现有一个deepin-wine需要更新,更 ...

  7. 【深度学习】批量归一化 BatchNormalization

    一.背景       机器学习的本质是对物理世界进行建模,做的就是拟合数据分布.      但是在模型训练过程中,神经网络参数不断更新,导数中间层的数据分布频繁地变化(内部协变量偏移),不利于网络参数 ...

  8. springboot+vue3+nuxt3+ts+minio开发的dsblog3.0前后端博客

    springboot+vue3+nuxt3+ts+minio开发的dsblog3.0前后端博客 转载自:www.javaman.cn 一.技术栈 本博客系统采用了先进且成熟的技术栈,包括Spring ...

  9. 谈谈Android中的消息提示那些坑

    Android中的消息提示无非就那几种,弹个窗(Toast或SnackBar),或者是弹出个对话框(Dialog),最近在使用的时候也是遇到了问题,有时候导致APP闪退 稍微研究会,总结了一下使用过程 ...

  10. [LeetCode] 5933. k 镜像数字的和

    一.摘要 本文介绍了一种通过模拟寻找十进制镜像数字,然后判断其对应的k进制表示是否也是镜像的方法.具体来讲即从小到大遍历10进制的镜像数字,然后对10进制镜像数字转为k进制,然后判断转为k进制后是否还 ...