Code phương pháp tính computing methodologies codes

15 69 0
Code phương pháp tính   computing methodologies codes

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

CODE Phuong Phap Tinh ETE_DUT Chia doi: #include #include #include void nhap( float d[20],int n){ int i; for (i=0;i0) a=c; else b=c; } while(fabs(e)>=0.001); printf("\n nghiem cua chuong trinh la:%.3f",c); } } Day cung: #include #include #include void nhap( float d[],int n){ int i; for (i=0;i0) a=x; else b=x; } while(fabs(f(d,n,x))>=0.001); printf("\nngiem cua phuong trinh la %.3f",x); printf("\ntiep tuc k?(c/k)"); q=getch(); if(q=='k') break; }} Le Huu Phu BR CODE Phuong Phap Tinh ETE_DUT Đổi BIẾn: #include #include #include void nhap( float d[20],int n) { int i; for (i=0;i0;k ) for(i=0;i0.000001) {q=q+t; k++; t=t*x/k; } return q; } float sin(float x) { float q=0; float t=x; int k=1; while(fabs(t)>0.000001) Le Huu Phu BR CODE Phuong Phap Tinh ETE_DUT { q=q+t; k=k+2; t=-t*x*x/(k*(k-1)); } return (q); } main () { while (1) { float x; char c; printf("nhap so goc x= "); scanf("%f",&x); x=x*3.14/180; printf("\ncos x = %f\n",cos(x)); printf("\nsin x = %f\n",sin(x)); printf("\n exp(x)=%f",exp(x)); c=getch(); if(c=='q') break; } } TRỊ RIÊNG VECTO RIÊNG: #include void nhap(float a[10][10],int n) { int i,j; for(i=1;i

Ngày đăng: 22/09/2019, 09:47

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan