Viết Chương Trình Giải Phương Trình Bậc 2: Ax^2 + Bx +c =0 · GitHub
Có thể bạn quan tâm
Skip to content Search Gists Search Gists All gists Back to GitHub Sign in Sign up Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }}
TheHeroTheWorldNeeds/assignment5.cpp Last active November 13, 2018 17:23 Show Gist options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment You can’t perform that action at this time.
Instantly share code, notes, and snippets.
- Download ZIP
- Star (0) You must be signed in to star a gist
- Fork (0) You must be signed in to fork a gist
- Embed Select an option
- Embed Embed this gist in your website.
- Share Copy sharable link for this gist.
- Clone via HTTPS Clone using the web URL.
No results found
Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/TheHeroTheWorldNeeds/a74caaa9db02884f18a42d6675edab68.js"></script> - Save TheHeroTheWorldNeeds/a74caaa9db02884f18a42d6675edab68 to your computer and use it in GitHub Desktop.
- Embed Embed this gist in your website.
- Share Copy sharable link for this gist.
- Clone via HTTPS Clone using the web URL.
No results found
Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/TheHeroTheWorldNeeds/a74caaa9db02884f18a42d6675edab68.js"></script> Save TheHeroTheWorldNeeds/a74caaa9db02884f18a42d6675edab68 to your computer and use it in GitHub Desktop. Download ZIP Viết chương trình giải phương trình bậc 2: ax^2 + bx +c =0 Raw assignment5.cpp This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters| #include <iostream> |
| using namespace std; |
| #include <math.h> |
| int main() |
| { |
| float a, b, c; |
| cout << "\t\t------- PHUONG TRINH BAC II: ax^2 + bx + c = 0 -------"; |
| cout << "\nEnter a: "; |
| cin >> a; |
| cout << "\nEnter b: "; |
| cin >> b; |
| cout << "\nEnter c: "; |
| cin >> c; |
| cout << "\nGiai phuong trinh bac II : " << a << "x^2 + " << b << "x + " << c << " = 0" << endl; |
| if (a == 0) |
| { |
| if (b == 0) |
| { |
| if (c == 0) |
| { |
| cout << "Phuong trinh vo so nghiem"; |
| } |
| else |
| { |
| cout << "Phuong trinh vo nghiem"; |
| } |
| } |
| else |
| { |
| cout << "Tro ve giai phuong trinh bac I: " << b << "x + " << c << " = 0"; |
| cout << "\n\tNghiem cua pt x = " << (float)-c/b << endl; |
| } |
| } |
| else |
| { |
| float x1, x2; |
| float Delta = (b * b) - (4 * a * c); |
| if (Delta < 0) |
| { |
| cout << "Phuong trinh vo nghiem"; |
| } |
| else if (Delta == 0) |
| { |
| cout << "Phuong trinh co no kep x = " << (float)-b / (2 * a); |
| } |
| else |
| { |
| cout << "Phuong trinh co 2 nghiem phan biet: "; |
| x1 = (-b + sqrt(Delta)) / (2 * a); |
| x2 = (-b - sqrt(Delta)) / (2 * a); |
| cout << "\n\t\tx1 = " << x1; |
| cout << "\n\t\tx2 = " << x2; |
| } |
| } |
| cout << endl; |
| system("pause"); |
| return 0; |
| } |
Từ khóa » Viết Phương Trình Giải Phương Trình Bậc 2 Ax^2+bx+c=0
-
Giải Phương Trình Bậc 2 Ax^2+bx+c=0 - Em Yêu Tin Học
-
Viết Chương Trình Giải Phương Trình Ax2 + Bx + C = 0 Với Các Hệ Số A ...
-
C++ - Giải Phương Trình Bậc Hai Ax2 + Bx + C = 0 - Freetuts
-
Tổng Hợp Dạng Toán Về Phương Trình Bậc 2 Một ẩn Thông Dụng Nhất.
-
Viết Chương Trình Giải Phương Trình Bậc 2: Ax2 + Bx + C = 0 (a Khác 0)
-
Lập Trình Pascal: Giải Phương Trình Bậc 2 - Bài Kiểm Tra
-
Viết Chương Trình Giải Phương Trình Bậc 2 (ax2+ Bx + C =0)
-
Viết Thuật Toán Giải Phương Trình Bậc 2 Ax2 + Bx + C = 0 Với A≠0
-
Giải Phương Trình Ax2+bx+c=0 - Thả Rông
-
Viết Chương Trình C++ Giải Phương Trình Ax2+bx+c=0. Với A B C được ...
-
Giải Phương Trình Bậc Hai Một ẩn Ax^2+bx+c=0 (a ≠ 0)
-
Viết Chương Trình Giải Phương Trình Bậc 2 (ax2 + Bx + C =0)
-
Giải Phương Trình Bậc 2 Ax² + Bx + C = 0 | C Programming - YouTube
-
Cách Giải Phương Trình Bậc 2 - Gia Sư Tâm Tài Đức