hutieuxidau
Thành viên mới

- Tham gia
- 26/5/11
- Bài viết
- 34
- Được thích
- 50
- Nghề nghiệp
- Kiểm định phần mềm
em có 1 bài tập, liên quan đến ngôn ngữ C. khi viết code xong, test thử đầu vào *f thì lại bị lỗi, nhưng không biết sửa thế nào. mong anh chị giúp em
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int n,k;
int a[70],b[70][5];
void tinhtoan(int i,int *f,int l)
{ printf("%d ",a);
*f=*f+1;
}
void main()
{ clrscr();
randomize();
n=random(70);
k=random(5);
// printf("%d %d",n,k);
int f=0,l=0;
for (int i=0;i<n;i++)
{a=random(9);
tinhtoan(i,&f,l);
print("%d",f);}
getch();
}
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int n,k;
int a[70],b[70][5];
void tinhtoan(int i,int *f,int l)
{ printf("%d ",a);
*f=*f+1;
}
void main()
{ clrscr();
randomize();
n=random(70);
k=random(5);
// printf("%d %d",n,k);
int f=0,l=0;
for (int i=0;i<n;i++)
{a=random(9);
tinhtoan(i,&f,l);
print("%d",f);}
getch();
}