int main(){
fload a[3]
scanf("%f,%f,%f",&a[0],&a[1],&a[2])
float temp
if(a[0]>a[1]){
temp = a[0]
a[0] = a[1]
a[1] = temp
}
if(a[1]>a[2]){
temp = a[1]
a[1] = a[2]
a[2] = temp
}
if(a[0]>a[1]){
temp = a[0]
a[0] = a[1]
a[1] = temp
}
print("%f %f %f \n", a[0],a[1],a[2])
}
#include "stdio.h"main(void)
{
printf(" http://wenku.baidu.com/link?url=6zxTXwfJCk-8ScL6WwVddfMMJaNNjOUHpPiW0IAN4JAz2XTf_d86K-d6QSjY_oIznP4DGiuzl2xH9pt42HCCUqMo8VmKc8LaT1miLuXMblW
")
}
你把这个拿去试试,我到网上找了一个帮你改的,看看可以不,
#include<stdio.h>
int main()
{
//int a[10][10]
int n
printf("please input the line:\n")
scanf("%d\n",&n)
getchar()
int i,j
for(i=0i<ni++)
{
a[i][0]=1
a[i][i]=1
}
for(i=2i<ni++)
for(j=1j<ij++)
a[i][j]=a[i-1][j-1]+a[i-1][j]
for(i=0i<ni++)
{
for(j=0j<=ij++)
printf("%d ",a[i][j])
printf("\n")
}
return 0
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)