tailieunhanh - Bài tập lập trình ứng dụng

Bài 1 #include int tong(int n) { int i,tong=0; for(i=1;i void max_min(int n) { int i;float max,min,x; for(i=0;ix) min=x;} } printf(“\nso lon nhat la:%f,so nho nhat la:%f”,max,min); } main() { max_min(n); } Bài 3 #include #include #include FILE *p; int i,j,k;float a[100][100]; void nhap(int m,int n) { .p=fopen(“”,”rt”); for(i=0;ia[k][i]) { tam=a[k][i]; a[j][i]=a[k][i]; a[k][i]=tam; } printf(“mang sau khi sap xep la:\n”); for(i=0;i | Bài 1 include stdio. h int tong int n . int i tong 0 for i 1 i n i tong i printf tong cac so tu 1 den .0d la n return tong main printf o od tong n Bài 2 include stdio. h void max_min int n int i float max min x for i 0 i n i scanf of x if i 0 max min x else if max x max x if min x min x printf nso lon nhat la f so nho nhat la f max min main max_min n Bài 3 include stdio. h include stdlib. h include FILE p int i j k float a 100 100 void nhap int m int n p fopen rt for i 0 i m i for j 0 j n j fscanf p f a i j printf phan tu dau tien la f n a 0 0 fclose p . void sapxep int m int n float tam for i 0 i n i for j 0 j n-1 j for k j 1 k n k if a j i a k i tam a k i a j i a k i a k i tam t . printf mang sau khi sap xep la n for i 0 i m i for j 0 j n j printf a i j printf n . void ghimatran int m int n p fopen wt fclose p main nhap m n sapxep m n ghimatran m n Bài 4 include stdio. h int dodaixau char s int k for k 0 s 0 s k return k main . printf do dai xau la d dodaixau . Bài 5 include stdio. h void xoakitu char s int i char ss 20 for i 0 s 0 s if s a ss i s i ss i 0 printf xau sau khi xoa la s ss main xoakitu . Bai 6 include stdio. h void ghepxau char s1 char s2 int i char s 100 for i 0 s1 0 s1 s i s1 i while s2 0 s i s2 s2 i s i 0 printf xau sau khi ghep la s s main ghepxau cô giáo hà very beautyfull and lovely Bai 7 include stdio. h void sokitu char s int ia ib ic for ia ib ic 0 s 0 s switch s case a ia break case b ib bresk case c ic break

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.