Báo cáo thực hành - ngôn ngữ lập trình
- Seiten
- 24
- Định dạng
- Dung lượng
- 326 KB
- Ngôn ngữ
- VI · Tiếng Việt
- Aufrufe
- 538
- Kommentare
- 0
- Lượt tải
- 0
Vorschau wird generiert...
- Dokumentenname
- Báo cáo thực hành - ngôn ngữ lập trình
- Inhaltsverzeichnis
- Dieses Dokument hat kein eindeutiges Inhaltsverzeichnis.
- Seiten
- 24 Seiten
- Hochgeladen von
- ThiNganHang
Eine detaillierte Zusammenfassung wird generiert. Bitte schauen Sie in ein paar Minuten noch einmal vorbei.
Beschreibung
Trích nội dung tài liệu
1 TRƯỜNG ĐẠI HỌC BÁCH KHOA Viện Điện tử - Viễn Thông BÁO CÁO THỰC HÀNH NGÔN NGỮLẬP TRÌNH Họ và tên: Nguyễn Đình Tâm Lớp: ĐT-TT 07 – K57 MSSV: 20122381 Hà Nội, 04/2014 https://fb.com/ 2 Program 1.1 #include <iostream> 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 <iostream> 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 <iostream> 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: "; https://fb.com/ 3 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 <iostream> using namespace std; void main() { double R[20],Rt,Rn; inti,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"); } https://fb.com/
Häufig gestellte Fragen
Wie lade ich dieses Dokument herunter?
Das Dokument „Báo cáo thực hành - ngôn ngữ lập trình“ kostet 10.000đ. Laden Sie Ihr Guthaben über PayOS auf, klicken Sie dann auf Herunterladen, um die Originaldatei zu kaufen und zu speichern.
Wie viele Seiten hat dieses Dokument?
Das Dokument hat 24 Seiten. Sie können es vor dem Herunterladen online in der Vorschau ansehen.
Kann ich vor dem Herunterladen eine Vorschau ansehen?
Ja. Sie können sich dieses Dokument direkt auf dieser Seite im Online-Reader ansehen (die ersten paar Seiten) und dann entscheiden, ob Sie es herunterladen möchten.
Báo cáo thực hành - ngôn ngữ lập trình
Vorschau wird generiert...
Trích nội dung tài liệu
1 TRƯỜNG ĐẠI HỌC BÁCH KHOA Viện Điện tử - Viễn Thông BÁO CÁO THỰC HÀNH NGÔN NGỮLẬP TRÌNH Họ và tên: Nguyễn Đình Tâm Lớp: ĐT-TT 07 – K57 MSSV: 20122381 Hà Nội, 04/2014 https://fb.com/ 2 Program 1.1 #include <iostream> 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 <iostream> 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 <iostream> 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: "; https://fb.com/ 3 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 <iostream> using namespace std; void main() { double R[20],Rt,Rn; inti,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"); } https://fb.com/
- Dokumentenname
- Báo cáo thực hành - ngôn ngữ lập trình
- Inhaltsverzeichnis
- Dieses Dokument hat kein eindeutiges Inhaltsverzeichnis.
- Seiten
- 24 Seiten
- Hochgeladen von
- ThiNganHang
Eine detaillierte Zusammenfassung wird generiert. Bitte schauen Sie in ein paar Minuten noch einmal vorbei.
Kommentare (0)
Noch keine Kommentare. Seien Sie der Erste!
Ngân hàng đề thi môn: Hệ thống thông tin quản lý
Đề thi môn Cơ sở dữ liệu (kèm Đáp án) - Đại học Sư phạm kỹ thuật
Đề thi và đáp án môn Hệ thống thông tin kế toán
Đề thi và đáp án môn Cấu trúc dữ liệu giải thuật
Đáp án đề thi môn Mạng máy tính - ĐH Công nghệ thông tin (CNTT)
Tiểu luận - Kinh tế phát triển - Phân tích nhận định "Việt Nam đã kiên định chọn hướng phát triển lấy con người làm trọng tâm ..."
Đề cương - Luật vận tải
600 Câu trắc nghiệm Tư tưởng Hồ Chí Minh
Tài liệu ôn tập Nguyên lý kế toán
Bài tập Xác suất thống kê đại học - có lời giải

Kommentare (0)
Noch keine Kommentare. Seien Sie der Erste!