- 3
- 0
- 约9.14千字
- 约 29页
- 2018-06-05 发布于江西
- 举报
c语言程序百例- - c语言(Cases of C language program - - C language).doc
c语言程序百例1-10 - c语言(Cases of C language program 1-10 - C language)
Cases of C language program 1-10
The list of print Publisher: admin report to a friend
Heat 47 votes 13562 views [5] [comment] time: I want to comment on 08 August 2009 17:16
[program 1]
Title: 1, 2, 3, 4 numbers, three digit number can be composed with each other and not repeat the number? How much are they?
1. program analysis: can fill at 100, ten, a number is 1, 2, 3, 4. Make up all the permutations and then go
An arrangement that does not meet the requirements.
2. program source code:
(main)
{
Int i, J, k;
Printf (\n);
For (i=1; i5; i++) / * three * following heavy cycle
For (j=1; j5; j++)
For (k=1; k5; k++)
{
If (I =ki =jj =k!!!) to ensure I, J, K / * three different.
Printf (%d,%d,%d\n, I, J, K);
}
}
[program 2]
Title: corporate bonuses based on profits. Profit (I) less than or equal to 100 thousand yuan, money can be raised 10% high profits;
At 100 thousand yuan, less than 200 thousand yuan, less than 100 thousand yuan in part, according to 10% Commission, higher than 100 thousand yuan part, cocoa mention
7.5%; 200 thousand to 400 thousand, more than 200 thousand yuan, the Commission 5%; more than 400 thousand to 600 thousand.
400 thousand yuan part, can deduct a percentage from 3%; between 600 thousand and 1 million, higher than 600 thousand yuan part, can deduct a percentage of 1.5%, higher than
1 million yuan, more than 1 million yuan part of the Commission by 1%, from the keyboard input month profit I, ask the total bonus should be awarded?
1. program analysis: please use a few axes to boundaries, positioning. Note that the definition needs to define integer growth bonus.
2. program source code:
(main)
{
Long int i;
Int bonus1, bonus2, bonus4, bonus6, bonus10, bonus;
Scanf (%ld, i);
Bonus1=100000*0.1; bonus2=bonus1+100000*0.75;
Bonus4=bonus2+200000*0.5;
Bonus6=bonus4+200000*0.3;
Bonus10=bonus6+400000*0.15;
If (i=100000)
Bonus=i*0.1;
Else if (i=200000)
Bonus=bonus1+ (i-100000) *0.075;
Else i
您可能关注的文档
- 超高分辨活细胞成像系统技术讲述.docx
- 醇脱羟基酸脱氢(共篇).doc
- 维列联表估计方法在电算初始化中的应用——手工会计下的转换.doc
- 西安电子科技大学 研究生 电波传播工程 期末试题讲述.doc
- gacrp对高糖高脂喂养巴马猪血糖及胰岛素敏感性影响.docx
- 《时务报》时务文体的特点及过渡性质.doc
- 2013年1季度斯维尔三维算量常见问题..doc
- 粒径可控纳米二氧化硅微球的制备_樊雅玲.doc
- 电子商务系统形式化分析与验证技术综述(Ⅱ).doc
- 研究生入学考试二外俄语.doc
- 2025-2026学年天津市和平区高三(上)期末数学试卷(含解析).pdf
- 2025-2026学年云南省楚雄州高三(上)期末数学试卷(含答案).pdf
- 2025-2026学年甘肃省天水市张家川实验中学高三(上)期末数学试卷(含答案).docx
- 2025-2026学年福建省厦门市松柏中学高二(上)期末数学试卷(含答案).docx
- 2025-2026学年广西钦州市高一(上)期末物理试卷(含答案).docx
- 2025-2026学年河北省邯郸市临漳县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省石家庄二十三中七年级(上)期末历史试卷(含答案).docx
- 2025-2026学年海南省五指山市九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省唐山市玉田县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省邢台市市区九年级(上)期末化学试卷(含答案).docx
原创力文档

文档评论(0)