编程求解一元二次方程道c的编程

09-1609-1309-1709-12
04-1201-0910-1302-17
◇本站云标签一个用于计算个人所有税的程序。假设个人所得税的缴纳标准为:月收入少于等于800元者不纳税;超出800元的部分,纳税5%;超出2000元的部分,纳税10%;超出5000元的部分,纳税20%;超出10000元的部分,纳税30%;超出100000元的部分,纳税40%。
#include "stdio.h"
float income,fax=0;
printf("Please input the income: \n");
scanf("%f",&income);
if(income&100000)
fax=(income-.4;
else if(income&10000)
fax=(income-1;
else if(income&5000)
fax=(income-;
else if(income&2000)
fax=(income-;
else if(income&800)
fax=(income-800)*0.05;
printf("The personal fax: %.2f\n",fax);
其他答案(共1个回答)
.h"
void main()
{
float income,fax=0;
printf("income:");
scanf("%f",&income);
if(income&100000)
fax+=(income-.4f;
income=100000;
if(income&10000)
fax+=(income-1f;
income=10000;
if(income&5000)
fax+=(income-f;
income=5000;
if(income&2000)
fax+=(income-f;
income=2000;
if(income&800)
...
#include "std相关信息.h"
void main()
{
float income,fax=0;
printf("income:");
scanf("%f",&income);
if(income&100000)
fax+=(income-.4f;
income=100000;
if(income&10000)
fax+=(income-1f;
income=10000;
if(income&5000)
fax+=(income-f;
income=5000;
if(income&2000)
fax+=(income-f;
income=2000;
if(income&800)
fax+=(income-800)*0.05f;
printf("fax:%.2f\n",fax);
}
#include "stdio.h"
void main()
printf("Please input a munber as salary");
# include &stdio.h&
# include &stdlib.h&
# include &string.h&
# include &math...
第一次纳税:448元。
第二次纳税:672元。
参照税务局网站,帮你算税栏目,只要输入数字及收入项目即可
定义个足够大的数组,把输入的N个整数作为数组的前N个元素。
先用基本的算法把这个数组的前N个数排序,然后按排好的顺序输出这前N个数就行了。
大家还关注
确定举报此问题
举报原因(必选):
广告或垃圾信息
激进时政或意识形态话题
不雅词句或人身攻击
侵犯他人隐私
其它违法和不良信息
报告,这不是个问题
报告原因(必选):
这不是个问题
这个问题分类似乎错了
这个不是我熟悉的地区扫二维码下载作业帮
拍照搜题,秒出答案,一键查看所有搜题记录
下载作业帮安装包
扫二维码下载作业帮
拍照搜题,秒出答案,一键查看所有搜题记录
求解一道C语言题!3.编写一个程序输入一个百分制成绩,要求输出成绩等级A、B、C、D、E.90分以上为A,80~89分为B,70~79分为C,60~69分为D,60分以下为E,switch语句来实现选择结构.
【天神】662
扫二维码下载作业帮
拍照搜题,秒出答案,一键查看所有搜题记录
#include int main()
printf("请输入学生成绩:");
scanf("%f",&score);
while (score>100||score
为您推荐:
其他类似问题
扫描下载二维码题目是这样的:
输入一个字符串(少于80个),再删除其中除字母和数字以外的其他字符。再判断新字符串是否对称、不区分大小写。在VC上编译没有错误,但是运行的时候总是弹出“程序已停止工作”的提示框,没有运行结果。代码如下:
#include &stdio.h&
#include &string.h&
#include &ctype.h&
void main()
{printf("请输入一个字符串:\n");
char a[80],b[80];
int i,len,cnt,
gets(a);
题目是这样的:
输入一个字符串(少于80个),再删除其中除字母和数字以外的其他字符。再判断新字符串是否对称、不区分大小写。在VC上编译没有错误,但是运行的时候总是弹出“程序已停止工作”的提示框,没有运行结果。代码如下:
#include &stdio.h&
#include &string.h&
#include &ctype.h&
void main()
{printf("请输入一个字符串:\n");
char a[80],b[80];
int i,len,cnt,
gets(a);
len=strlen(a);
for(i=0;i&i++)
if(isalpha(a[i])||isdigit(a[i]))
b[cnt++]=a[i];
for(i=0;i&i++)
if(isalpha(b[i]))
b[i]=tolower(b[i]);
for(i=0;i&cnt/2;i++)
{
if(b[i]!=b[cnt-1-i])
{ flag=0;
}
else flag=1;
if(flag)
printf("该字符串是对称的\n");
else
printf("该字符串不是对称的\n");
}
应该是没有初始化 cnt = 0
两个程序均已通过。一个倒过来打印,另一个翻转后打印。
第一个程序:
#include &stdio.h&
#include &string.h&
#include "stdio.h"
#include "string.h"
#define MaxContent 100
void main()
大家还关注
确定举报此问题
举报原因(必选):
广告或垃圾信息
激进时政或意识形态话题
不雅词句或人身攻击
侵犯他人隐私
其它违法和不良信息
报告,这不是个问题
报告原因(必选):
这不是个问题
这个问题分类似乎错了
这个不是我熟悉的地区

我要回帖

更多关于 编程求解鸡兔同笼问题 的文章

 

随机推荐