1.你是要打开图片吗?(把图像显示出来?)
2.还是只需要图片文件。
如果是1,那么你需要看.bmp的编码方式和c库的图像类函数
如果是2,那么你就可以用fopen,fread,fwrite,fprintf,fscanf等调用即可。
C语言程序:
#include <stdio.h>int isDup(int n)
void main()
{
int n
int c = 0
for(n=3001 n<6000 n+=2)
{
if(isDup(n) == 1)
continue
if(c>0 && c%10==0)
printf("\n")
printf("%6d", n)
c++
}
printf("\n总数:%d\n", c)
}
/* 判断n(4位数)的数位中是否有重复数字,若有返回1,否则返回0 */
int isDup(int n)
{
int a, b, c, d
a = n / 1000
b = n / 100 %10
c = n % 100 / 10
d = n % 10
if(a!=b && a!=c && a!=d && b!=c && b!=d && c!=d)
return 0
return 1
}
运行结果: