Bài tập thực hành môn Nguyên lý kế toán

BÀI TẬP 8 Tại một doanh nghiệp SXKD có các tài liệu sau: Số dư đầu kỳ của TK154 : 1.300.000đ Tình hình phát sinh trong tháng: 1. Xuất kho vật liệu có trị giá 80.000.000đ sử dụng cho: - trực tiếp SXSP : 64.000.000đ - Phục vụ ở phân xưởng sản xuất: 8.000.000đ - Bộ phận bán hàng : 3.000.000đ - Bộ phận quản lý doanh nghiệp : 5.000.000đ 2. Tiền lương phải thanh toán cho người lao động là 32.000.000đ trong đó: - Công nhân trực tiếp sản xuất : 18.000.000đ - Nhân viên phân xưởng: 4.000.000đ - Nhân viên bán hàng : 4.000.000đ - Nhân viên quản lý doanh nghiệp : 6.000.000 3. Trích lập các khoản phải trả theo lương theo quy định 4. Khấu hao TSCĐ là 20.000.000đ, phân bổ cho: - Phân xưởng SX : 12.000.000đ - Bộ phận bán hàng : 3.000.000đ - Bộ phận quản lý doanh nghiệp : 5.000.000đ 5. Trong tháng sản xuất hoàn thành 2.000sp đã nhập kho TP cho biết chi phí SXDD cuối tháng 1.180.000đ 6. Xuất kho 1.600 SP để bán trực tiếp cho khách hàng X, giá bán chưa có thuế là 100.000đ/sp, TGTGT tính theo thuế suất 10%. Tiền hàng khách hàng chưa thanh toán 7. Khách hàng thanh toán tiền mua SP cho DN bằng TGNH cho lô hàng 1.600 sp, chiết khấu thanh toán cho khách hàng được hưởng là 1% giá bán chưa có thuế 8. Xuất kho 200 SP để bán cho khách hàng Y, giá bán có TGTGT là 10%, khách hàng thanh toán bằng tiền mặt Yêu cầu: 1. Tính toán, định khoản các nghiệp vụ kinh tế phát sinh 2. Xác định giá thành đơn vị SP nhập kho 3. Tiến hành kết chuyển để xác định kết quả kinh doanh BÀI GIẢI I, Định khoản các nghiệp vụ kinh tế phát sinh 1. Nợ TK 621 : 64.000.000 Nợ TK 627 : 8.000.000 Nợ TK 641 : 3.000.000 Nợ TK 642 : 5.000.000 Có TK 152 : 80.000.000 2. Nợ TK 622 : 18.000.000 Nợ TK 627 : 4.000.000 Nợ TK 641 : 4.000.000 Nợ TK 642 : 6.000.000 Có TK 334 : 32.000.000 3 Nợ TK 622 : 18.000.000*19% = 3.420.000 Nợ TK 627 : 4.000.000*19% = 760.000 Nợ TK 641 : 4.000.000*19% = 760.000 Nợ TK 642 : 6.000.000* 19% = 1.140.000 Có TK 338 : 6.080.000 4. Nợ TK 627 : 12.000.000 Nợ TK 641 : 3.000.000 Nợ TK 642 : 5.000.000 Có TK 214 : 20.000.000 5.Kết chuyển CP tính giá thành SP Nợ TK 154 : 98.180.000 Có TK 621 : 64.000.000 Có TK 622 : 18.000.000 + 3.420.000 = 21.420.000 Có TK 627 ; 8.000.000 + 4.000.000 + 760.000 = 12.760.000 Tổng giá thành SP = 1.300.000 + 98.180.000 - 1.180.000 = 98.300.000 Giá thành đơn vị SP = 98.300.000/2.000 = 49.150đ/sp Nhập kho TP SX trong kỳ Nợ TK 155 : 98.300.000 Có TK 154 : 98.300.000

docx17 trang | Chia sẻ: hachi492 | Ngày: 08/01/2022 | Lượt xem: 445 | Lượt tải: 0download
Bạn đang xem nội dung tài liệu Bài tập thực hành môn Nguyên lý kế toán, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
Họ và tên : Phạm Xuân Bắc Lớp : ĐTTT 07 K57 MSSV : 20121268 Bài tập thực hành Program 1.1 #include using namespace std; void main() { char a; cout<<"nhap mot ki tu\t"; cin >> a; cout<<"Ki tu la "<< a <<"\nMa ASSI la "<< dec << (int)a<<"\n"; cout<< hex << "He co so 16 la 0x" << (int)a << "\n"; cout<< oct <<"He co so 8 la 0"<<(int)a << "\n"; system("pause"); } Program 1.2 #include using namespace std; void main() { double f,C,pi; pi=3.14159; cout<<"Nhap f="; cin>> f; cout<<"\n"; cout<<"Nhap C="; cin>>C; cout<<"\n"; cout<<"Xc="<<1/(2*pi*f*C); system("pause"); } Program 1.3 #include using namespace std; void main() { double R1,R2,R3; char cach_mac[20]; cout<<"R1="; cin>>R1; cout<<"R2="; cin>>R2; cout<<"R3="; cin>>R3; cin.ignore(); cout<<"Cach mac 3 dien tro la: "; cin.get(cach_mac, 20); if (strcmp(cach_mac, "noi tiep") == 0) cout<<"Rt= "<<R1+R2+R3; else cout<<"Rt= "<<(1/(1/R1+1/R2+1/R3)); system("pause"); } Program 2.1 #include using namespace std; void main() { double R[20],Rt,Rn; int i,n; char cach_mac[20]; Rt=0; Rn=1; cout<<"so dien tro trong mach la\t"; cin>>n; for(i=1;i<=n;i++) { cout<<"R["<<i<<"]="; cin>>R[i]; Rt=Rt+R[i]; Rn=Rn*R[i]; } cin.ignore(); cout<<"Cach mac"<<i-1<<" dien tro la: "; cin.get(cach_mac, 20); if (strcmp(cach_mac, "noi tiep") == 0) cout<<"Rt= "<<Rt; else cout<<"Rt= "<<(Rn/Rt); system("pause"); } Program 2.2 #include using namespace std; void main() { char qua[200]; int i,l,k,t=1; k=0; cout<<"Ban dang nghi gi\n"; cin.get(qua, 200); l=strlen(qua); if(qua[0]==32) { cout<<"Dau cach dau cau\n"; t=0; } if(qua[l-1]==32) { cout<<"Dau cach cuoi cau\n"; t=0; } for(i=0;i<l;i++) { if(qua[i]==32&& qua[i+1]==32) { cout<<"hai dau cach lien nhau\n"; t=0; break; } } if (t==1) { for (i = 0; i<l; i++) if (qua[i]==32) k++; cout << "so tu la: " << k+1 << endl; } system("pause"); } Program 2.3 #include using namespace std; void main() { double a[10][10],h[100],k[100]; int i,j,n,m,S; cout<<"nhap m="; cin>> m; cout<<"nhap n="; cin>>n; if(n>10||n10||m<0) cout<<"khong dung quy cach\n"; else { for(i=0;i<m;i++) { for(j=0;j<n;j++) { cout<<"Nhap a["<<i+1<<"]["<<j+1<<"]="; cin>> a[i][j]; } } for(i=0;i<m;i++) { h[i]=0; for(j=0;j<n;j++) { h[i]=h[i]+a[i][j]; } cout<<"tong hang "<<i+1<<" la "<<h[i]<<"\n"; } for(j=0;j<n;j++) { k[j]=0; for(i=0;i<m;i++) { k[j]=k[j]+a[i][j]; } cout<<"tong cot "<<j+1<<" la "<<k[j]<<"\n"; } S=0; for(i=0;i<m;i++) { for(j=0;j<n;j++) { S=S+a[i][j]; } } cout<<"Tong ma tran la "<<S; } system("pause"); } Bài 1 #include using namespace std; int Factorial(int n) { if(n<2) return 1; else { return n*Factorial(n-1); } } void main() { int n; cout<<"Nhap n= "; cin>> n; cout<<n<<"!="<<Factorial(n)<<"\n"; system("pause"); } Bài 2 #include using namespace std; double Pow(double x, int n) { if (n==0) { return 1; } else if (n==1) { return x; } else return x*Pow(x, n-1); } void main() { int n; double x; cout<<"Nhap x="; cin>> x; cout<<"Nhap n="; cin>>n; cout <<"x^n="<<Pow(x, n)<<"\n"; system("pause"); } Bài 3 #include using namespace std; int USCLN (int a,int b) { while(a!=b) { if(a>b) a=a-b; else b=b-a; } return a; } void main() { int a,b; cout<<"Nhap a="; cin>>a; cout<<"Nhap b="; cin>>b; if(a==0 || b==0) cout<<"Khong co uoc\n"; else cout<<"USCLN="<<USCLN(a,b)<<"\n"; system("pause"); } Bài 4 #include #include using namespace std; double Pow(double x, int n) { if (n==0) { return 1; } else if (n==1) { return x; } else return x*Pow(x, n-1); } double Value(double a[],int n,double x) { int i; double f=0; for(i=0;i<=n;i++) { f=a[i]*Pow(x,i)+f; } return f; } void main() { int i,n,x; double a[10]; cout<<"Nhap n="; cin>> n; cout<<"Nhap x="; cin>> x; for(i=0;i<=n;i++) { cout<<"Nhap a["<<i<<"]="; cin>> a[i]; } cout<<"f(x)="<<Value(a,n,x); system("pause"); } Bài 5 #include using namespace std; double Pow(double x, int n) { if (n==0) { return 1; } else if (n==1) { return x; } else return x*Pow(x, n-1); } double Root(double a[],int n,double x1,double x2) { int i; double x; for(x=x1;x<=x2;x+=0.01) { double f=0; for(i=0;i<=n;i++) { f=a[i]*Pow(x,i)+f; } if(f==0) return x; } } void main() { int i,n; double x1, x2; double a[10]; cout<<"Nhap n="; cin>> n; for(i=0;i<=n;i++) { cout<<"Nhap a["<<i<<"]="; cin>> a[i]; } cout<<"Nhap x1="; cin>> x1; cout<<"Nhap x2="; cin>>x2; cout<<"giao truc hoanh tai x="<<Root(a,n,x1,x2); system("pause"); } Bài 6 #include using namespace std; void InsertionSort(int A[], int N, int Indies[]) { int i,j, e; for(i=1; i <= N; i++) { for(j = i - 1; j>=1; j--) if(A[Indies[j]] > A[i]) { Indies[j+1] = Indies[j]; } else break; Indies[j+1] = i; } } void main() { int A[100],i,N,Indies[100]; cout<<"Nhap so phan tu n="; cin>> N; for(i=1;i<=N;i++) { cout<<"Nhap A["<<i<<"]="; cin >> A[i]; } cout<<"Day sau khi sap xep la: " << endl; InsertionSort(A,N,Indies); for (int i = 1; i <= N; i++) cout << A[Indies[i]] << " "; system("pause"); } Bài 7 #include using namespace std; void SelectionSort(int a[], int n, int Indies[]) { int i,j,e; for(i=1;i<n;i++) { e=i; for(j=i+1;j<=n;j++) { if(a[j]<a[e]) e=j; } if(e!=i) swap(a[i],a[e]); } } void main() { int a[100],i,n,Indies[100]; cout<<"Nhap so phan tu n="; cin>> n; for(i=1;i<=n;i++) { cout<<"Nhap a["<<i<<"]="; cin >> a[i]; } cout<<"Day sau khi sap xep la: " << endl; SelectionSort(a,n,Indies); for (int i = 1; i <= n; i++) cout << a[i] << " "; system("pause"); } Bài 8 #include using namespace std; void BubbleSort(int a[], int n, int Indies[]) { int i,j,c; for(i=1;i<n;i++) { c=0; for(j=n;j>=i+1;j--) { if(a[j-1]>a[j]) { swap(a[j-1],a[j]); c=1; } } if(c==0) return; } } void main() { int a[100],i,n,Indies[100]; cout<<"Nhap so phan tu n="; cin>> n; for(i=1;i<=n;i++) { cout<<"Nhap a["<<i<<"]="; cin >> a[i]; } cout<<"Day sau khi sap xep la: " << endl; BubbleSort(a,n,Indies); for (int i = 1; i <= n; i++) cout << a[i] << " "; system("pause"); } Bai 9 #include using namespace std; int Part(int a[], int l,int r) { int i=l+1; int j=r; while (j>=i) { while (i<=j && (a[i]<a[l])) i++; while (i<=j && (j==i || (a[l]<a[j]))) j--; if(i<j) swap(a[i++],a[j--]); } swap(a[l],a[j]); return j; } void main() { int a[100],i,r,l; l=1; cout<<"Nhap so phan tu n="; cin>> r; for(i=l;i<=r;i++) { cout<<"Nhap a["<<i<<"]="; cin >> a[i]; } cout<<"Day sau khi sap xep la: " << endl; Part(a,l,r); for (int i = 1; i <= r; i++) cout << a[i] << " "; system("pause"); } Bài 10 #include #include using namespace std; void HeapRify(float*A,int i,int n,int Indies[]) { int max,left,right,tg2; float tg; left=2*i+1; right=2*i+2; if(left<n) { max=left; if((rightA[Indies[left]])) max=right; if(A[Indies[i]]<A[Indies[max]]) { tg2=Indies[i];tg=A[Indies[i]]; Indies[i]=Indies[max]; A[Indies[i]]=A[Indies[max]]; Indies[max]=tg2; A[Indies[max]]=tg; HeapRify(A,max,n,Indies); } } } void BuilHeap(float*A,int n,int Indies[]) { for(int i=n/2;i>=0;i--)HeapRify(A,i,n,Indies); } void HeapSort(float*A,int n,int Indies[] { float tg; int tg2; BuilHeap(A,n,Indies); for(int i=n-1;i>0;i--) { tg2=Indies[0]; tg=A[Indies[0]]; Indies[0]=Indies[i];A[Indies[0]]=A[Indies[i]]; HeapRify(A,0,i,Indies); } } int main(int argc,char*argv[]) { float*A; int n,i,*Indies; do { cout>n; } while(n<=0); A=new float[n]; Indies=new int[n]; for(i=0;i<n;i++) { Indies[i]=i; printf("A[%d]=",i); cin>>A[Indies[i]]; } HeapSort(A,n,Indies); cout<<"\n Mang sau khi sap xep"<<endl; for(i=0;i<n;i++) cout<<"A["<<Indies[i]<<"]="<<A[Indies[i]]<<endl; cout<<"\n \n"; system("pause"); } Bài 12 #include using namespace std; class Int32 { int value; public: Int32(int v):value(v) {} void Parse(const char*s); } void Int32::Parse(const char*s) { int k,tmp=0; int l=strlen(s); for(int i=0;i<l;i++) { k=s[i]-48; tmp=tmp*10+k; } value=tmp; } Bài 13 #include #include using namespace std; class Array { int*data,len; public: Array(int A[],int N); ~Array(); int Sum(); double Avg(); int Max(); int Min(); void GetRange(int & min,int& max); }; Array::Array(int A[],int N) { len = N; data = A; } Array::~Array() { delete[] data; } int Array::Sum() { int i,sum=0; for(i=0;i<len;i++) { sum=sum+data[i]; } return sum; } double Array::Avg() { int Sum=Array::Sum(); return Sum/len; } int Array::Max() { int max,i; max=data[1]; for(i=0;i<len;i++) { if(max<data[i+1]) max=data[i+1]; } return max; } int Array::Min() { int min,i; min=data[1]; for(i=0;i<len;i++) { if(min>data[i+1]) min=data[i+1]; } return min; } void Array::GetRange(int & min,int & max) { int i; min=data[1]; max=data[1]; for(i=0;i<len;i++) { if(min>data[i+1]) min=data[i+1]; if(max<data[i+1]) max =data[i+1]; } } Bài 15 #include #include using namespace std; class TamGiac { double _a, _b, _c; private: int Kieu(); public: TamGiac(double a, double b, double c); void Print(); }; int TamGiac::Kieu() { if ((_a fabs(_b - _c)) && (_a*_b*_c > 0)) { if ((_a == _b) && (_b == _c)) return 1; // Tam giac deu if ((fabs(_a*_a - _b*_b - _c*_c) < 1e-8) || (fabs(_b*_b - _a*_a - _c*_c) < 1e-8) || (fabs(_c*_c - _a*_a - _b*_b) < 1e-8)) if ((_a == _b) || (_b == _c) || (_c == _a)) return 3; // Tam giac vuong can else return 2; // Tam giac vuong else if ((_a == _b) || (_b == _c) || (_c == _a)) return 4; // Tam giac can return 0; // Tam giac thuong } else return -1; } TamGiac::TamGiac(double a, double b, double c) { _a = a; _b = b; _c = c; } void TamGiac::Print() { switch (Kieu()) { case 0: cout << "Tam giac thuong."; break; case 1: cout << "Tam giac deu."; break; case 2: cout << "Tam giac vuong."; break; case 3: cout << "Tam giac vuong can."; break; case 4: cout << "Tam giac can."; break; default: cout << "Tam giac khong hop le."; } } int main(void) { TamGiac tg(2, sqrt((double)2), sqrt((double)2)); tg.Print(); system("pause"); }

Các file đính kèm theo tài liệu này:

  • docxbai_tap_thuc_hanh_mon_ngon_ngu_lap_trinh.docx
Tài liệu liên quan