典C语言程序设计10
来源:互联网 发布:gta5怎么优化 编辑:程序博客网 时间:2024/05/16 16:13
output(long b,long i)
{ printf("\n%ld/%ld=809*%ld+%ld",b,i,i,b%i);
}
main()
{long int a,b,i;
a=809;
for(i=10;i<100;i++)
{b=i*a+1;
if(b>=1000&&b<=10000&&8*i<100&&9*i>=100)
output(b,i); }
}
-----------------------------------------------------------------------------
【程序82】
题目:八进制转换为十进制
1.程序分析:
2.程序源代码:
main()
{ char *p,s[6];int n;
p=s;
gets(p);
n=0;
while(*(p)!='\0')
{n=n*8+*p-'0';
p++;}
printf("%d",n);
}
-----------------------------------------------------------------------------
【程序83】
题目:求0—7所能组成的奇数个数。
1.程序分析:
2.程序源代码:
main()
{
long sum=4,s=4;
int j;
for(j=2;j<=8;j++)/*j is place of number*/
{ printf("\n%ld",sum);
if(j<=2)
s*=7;
else
s*=8;
sum+=s;}
printf("\nsum=%ld",sum);
}
----------------------
http://v.17173.com/playlist_16884505?retcode=0
http://v.17173.com/playlist_16886076?retcode=0
http://v.17173.com/playlist_16887350?retcode=0
http://v.17173.com/playlist_16888493?retcode=0
http://v.17173.com/playlist_16890334?retcode=0
http://v.17173.com/playlist_16892055?retcode=0
http://v.17173.com/playlist_16895410?retcode=0
http://v.17173.com/playlist_16896740?retcode=0
http://v.17173.com/playlist_16897850?retcode=0
http://v.17173.com/playlist_16898808?retcode=0
http://v.17173.com/playlist_16913368?retcode=0
http://v.17173.com/playlist_16914773?retcode=0
http://v.17173.com/playlist_16915760?retcode=0
http://v.17173.com/playlist_16916720?retcode=0
http://v.17173.com/playlist_16917839?retcode=0
http://v.17173.com/playlist_16919666?retcode=0
http://v.17173.com/playlist_16920724?retcode=0
http://v.17173.com/playlist_16925741?retcode=0
http://v.17173.com/playlist_16926760?retcode=0
http://v.17173.com/playlist_16928107?retcode=0
- 典C语言程序设计10
- C语言程序设计(10)
- c语言程序设计
- c语言程序设计
- c语言程序设计
- C语言程序设计
- C语言程序设计
- C语言程序设计
- C语言程序设计
- C语言程序设计
- c语言程序设计
- c语言程序设计
- C语言程序设计
- C语言程序设计
- c语言程序设计
- C语言程序设计
- 16 - 10 - 30 命令行参数 ----------《c语言程序设计》
- C语言程序设计---10:利用文件保存数据
- war文件
- 转自百度贴吧---串口通信中波特率和比特率的概念
- chrome浏览器debug版本调试并且输出调试信息
- 黑马程序员 C#中四个常用集合
- Redis使用入门
- 典C语言程序设计10
- stm32启动代码分析
- 《开会就要学三星》阅读笔记
- 【cocos2d-x从c++到js】JS与C++的交互1——JS代码调用C++代码
- hadoop MultipleInputs 的使用
- Java架构介绍(一)
- Socket编程
- 我是一个人
- 做技术牛人