百鸡百钱问题
来源:互联网 发布:软件测试管理系统 编辑:程序博客网 时间:2024/05/22 02:13
#include <stdio.h>
int main()
{
int a;
int b;
int c;
int count = 0;
for(a = 1; a <= 5;a++)
{
for(b = 1; b <= 5;b++)
{
for(c = 1;c <= 5;c++)
{
if((a != b) && (a != c) && (b != c))
{
printf("a borrow %d ,b borrow %d,c borrow %d\n",a,b,c);
count++;
}
}
}
}
printf("there have %d ways to do it\n",count);
return 0;
}
0 0
- 百鸡百钱问题
- 百鸡百钱问题
- 百鸡百钱问题
- 百鸡百钱问题
- 百鸡百钱问题
- 百鸡百钱问题
- 百鸡百钱问题C++解法
- 项目4-百鸡百钱问题
- 1.1_百鸡百钱问题
- 1032:百鸡百钱问题
- 百鸡百钱问题_源码
- 问题
- 问题
- 问题
- 问题
- 问题
- 问题
- 问题
- 配置haproxy虚拟主机
- 极简keras:实现神经网络风格迁移(neural style)
- 2016.11.30
- 《笨办法学python》习题38 40
- 【Python】Python函数大全
- 百鸡百钱问题
- spark dataframe操作
- 属于RecyclerView的万能适配器Adapter和ViewHolder
- 内存频率与带宽
- matlab 函数句柄(function handle)
- HDU-2095 find your present (2)
- 权限问题
- 【Leetcode】153. Find Minimum in Rotated Sorted Array
- 是否可以在static环境中访问非static变量?