Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Kỹ thuật lập trình :: Bài thực hành số 4 :: Ki u u tr c n n .

M c tiêu:
1. .
2.
3.
4.

n :

input output

1.

2. void input(PS &phanso) phanso;


3. void output(PS phanso) phanso ;
4. int ucln(int a, int b)
;
5. void toigian(PS &phanso) phanso;
6.

#include <stdio.h>
typedef struct ps
{

}PS;
void input(PS &phanso);
void output(PS phanso);
int ucln(int a, int b);
void toigian(PS &phanso);
int main()
{
PS p;
printf("\nNhap phan so:"); input(p);
printf("\nPhan so vua nhap:"); output(p);
toigian(p);
printf("\nPhan so sau khi toi gian:"); output(p);
return 0;
}
Page 1/2
Kỹ thuật lập trình :: Bài thực hành số 4 :: Ki u u tr c n n .
n 2:

1.
-
Ox Point
sau:
typedef struct point
{ int x;
int y;
}Point;

2. V ế ạ ẳ 1P2 khi
ế
float P1P2(Point P1, Point P2);
G : ứ ạ ẳ
AB:
⃗⃗⃗⃗⃗ = √

3. V ế 1P2P3 ế
khi P1, P2, P3 ẳ
float SP1P2P3(Point P1, Point P2, Point P3);

4. ứ ứ
A A
0 1 2 , A A A
0 2 3 , A 0 3A4, ..., An-2An-1An, An-1AnA0
A
-
-
#define max 1000
typedef Point PointArray[max];
- Vế
float S(PointArray A, int n);

n A S
3 x
y
6 x
y
10 x
y

5. hực hi n i tr li u và i c nhận c là i cl i
6. r n tr n h p i c h n l i chi a i c ch tập c c i cl i

Page 2/2

You might also like