Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
test
ф#include <iostream> #include <string> #include <cmath> #include <strings.h> using namespace std; int main(int argc , char* argv[]) { cout << "made by god" << endl << endl; double a,b,c,discr,answer,x1,x2; //cout << "enter a,b,c"; cout << endl; //cin >> a >> b >> c ; cout << endl; string temp; temp = argv[1];a = stod(temp); // set a temp = argv[2];b = stod(temp); // set b temp = argv[3];c = stod(temp); // set c discr = b*b - 4*a*c; if(discr < 0){ cout << "there are no soulves " << endl;return -1;} else if(discr == 0) { answer = ((-1*b)/(2*a)); cout << "answer is " << answer << endl; return 1; } else { x1 = ((-1 * b) + sqrt(discr)) / 2*a; x2 = ((-1 * b) - sqrt(discr)) / 2*a; cout << "answers are" << endl << "x1 = " << x1 << endl << "x2 = " << x2 << endl; } }
run
|
edit
|
history
|
help
0
TraiectorieIdeala2
Right view of a tree
带头结点的单链表
NonparaSign
dsu on tree (http://codeforces.com/contest/208/problem/E)
Shultz_Lab2.CPP
ClassQuiz
ForwardLiceSplice
akshitha
C++