#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
int yournumber,mynumber,count=;
char c;
do{
srand((unsigned)time(NULL));
mynumber=(rand()%(-)+);
do{
printf("请输入您所猜的数字:");
scanf("%d",&yournumber);
count++;
if(yournumber>mynumber)
printf("大了\n");
else if (yournumber<mynumber)
printf("小了\n");
else (yournumber==mynumber)
printf("猜对了!:\n");
}while(yournumber!=mynumber);
printf("您一共猜了:%d次\n",count);
if(count<=)
printf("完美 你好聪明\n");
else if(count> && count<=)
printf("你智力还算正常的哦!\n");
else
printf("哎呦 还是多干干不用脑子的事儿吧:\n");
printf("继续请按y|Y,退出请按n|N:");
getwchar();
c=getwchar();
system("cls");
} while(c=='y'||c=='Y');
return ;
}

#include<stdio.h>
#include<math.h>
int main()
{
int a,b,c,l,p,s;
printf("请输入三个数:");
scanf("%d%d%d",&a,&b,&c);
if(a+b>c && a-b<c)
{
l=a+b+c;
p=(a+b+c)/2;
s=sqrt(p*(p-a)*(p-b)*(p-c));
printf("可以构成三角形:\n");
printf("三角形周长为 :%d\n三角形面积为:%d",l,s);
}
else
printf("不可以构成三角形:");
return 0;
}

#include<stdio.h>
int main()
{
float a,tax=,taxincome=;
printf("请输入您的工资:");
scanf("%f",&a);
if(a<=)
{
tax=(a-)*0.03;
taxincome=a-tax;
}
else if(a>||a<=)
{
tax=(a-)*0.1-;
taxincome=a-tax;
}
else if(a>||a<=)
{
tax=(a-)*0.2-;
taxincome=a-tax;
}
else if(a>||a<=)
{
tax=(a-)*0.25-;
taxincome=a-tax;
}
else if(a>||a<=)
{
tax=(a-)*0.3-;
taxincome=a-tax;
}
else if(a>||a<=)
{
tax=(a-)*0.35-;
taxincome=a-tax;
}
else
{
tax=(a-)*0.45-;
taxincome=a-tax;
}
printf("您本月应交税为:%f\n您本月的税后收入为:%f\n",tax,taxincome);
return ;}

C语言 homework (3)的更多相关文章

  1. C 语言 homework(2)

    <C语言程序设计>实验报告 学 号 160809215 姓 名 韩笑 专业.班 计科16-2班 学 期 2016-2017 第1学期 指导教师 黄俊莲 吴喆 实验地点 C区二层机房 机 器 ...

  2. C语言 homework(4)

    #include <stdio.h> int main(){ ; i=; ) { sum+=i; i++; } printf("sum=%d\n",sum); ; } ...

  3. 网络1711c语言第0次作业总结

    作业地址:https://edu.cnblogs.com/campus/jmu/JMUC--NE17111712/homework/861 总结 1.评分标准 以下要求中除了未交和抄袭0分,其他项最多 ...

  4. 网络1711c语言第3次作业总结

    作业地址:https://edu.cnblogs.com/campus/jmu/JMUC--NE17111712/homework/1166 总结 1.评分细则 评分注意事项 注意用Markdown语 ...

  5. 结对编程项目——C语言实现WordCount Web化

    结对编程项目 代码地址 201631062219,201631011410 gitee项目地址:https://gitee.com/xxlznb/pair_programming 作业地址:https ...

  6. CSCI 1100 — Computer Science 1 Homework

    CSCI 1100 — Computer Science 1 Homework 8CS1 Multiverse: ClassesOverviewThis homework is worth 100 p ...

  7. STA 141A, Homework

    STA 141A, Homework 2Due April 30th 2019 (by 8 am) Name:Student ID:Section:Names of your study mates: ...

  8. 2018上C语言程序设计(高级)作业- 第4次作业成绩及总结

    作业地址 https://edu.cnblogs.com/campus/hljkj/CS2017-01/homework/1842 评分准则 第4次作业各项成绩包括三项: 完成WC项目:60分:基本功 ...

  9. 【软件工程Ⅱ】作业四 |个人项目-小学四则运算 “软件”之初版(C语言)

    本次作业的要求来自于:https://edu.cnblogs.com/campus/gzcc/GZCC-16SE2/homework/2186 本次作业代码的github地址:https://gith ...

随机推荐

  1. fcc的高级算法题

    核心提示:本部分一个9道题,给定时间50小时.属于fcc前端学习的"高级编程脚本"题,对于初学者来说,确实算是"高级"了.如果只想着闭门造车,50小时确实也不过 ...

  2. 微软.NET序列化格式

    官方文档 https://msdn.microsoft.com/en-us/library/cc236844.aspx 对比 http://www.codeproject.com/Articles/3 ...

  3. robots.txt的介绍和写作

    目前很多网站管理者似乎对robots.txt并没有引起多大重视,甚至不知道这么一个文件的作用.本来应该保密的信息被爬虫抓取了,公布在公网上,本应该发布到公网的信息却迟迟不被搜索引擎收录.所以下面这篇文 ...

  4. AutoMapper.EF6

    https://github.com/AutoMapper/AutoMapper.EF6 Extensions for AutoMapper and EF6 This contains some us ...

  5. History(历史)命令用法

    如果你经常使用 Linux 命令行,那么使用 history(历史)命令可以有效地提升你的效率.本文将通过实例的方式向你介绍 history 命令的用法. 使用 HISTTIMEFORMAT 显示时间 ...

  6. 工具,如何去掉百度编辑器 ueditor 元素路径、字数统计等

    去掉如下截图: 在百度编辑器 ueditor 根目录下: ueditor.config.js 文件中 搜索并将参数elementPathEnabled设置成false即可 常用功能开关如下: ,ele ...

  7. 安装CentOS7重启后提示License information

    Initial setup of CentOS Linux (core) ) [x] Creat user ) [!] License information (no user will be cre ...

  8. haproxy配置文件

    haproxy配置文件   思路:读一行.写一行 global log 127.0.0.1 local2 daemon maxconn 256 log 127.0.0.1 local2 info de ...

  9. MongoDB设置访问权限、设置用户(转)

    MongoDB已经使用很长一段时间了,基于MongoDB的数据存储也一直没有使用到权限访问(MongoDB默认设置为无权限访问限制),今天特地花了一点时间研究了一下,研究成果如下: 注:研究成果基于W ...

  10. jsonp解决CORS问题

    jsonp是个机智的解决办法: 1.本地页面写个js方法 <script> function abc(data) { alert(data.result); } </script&g ...