Δημοσιεύτηκε: 03 Δεκ 2009, 12:22
εκανα ενα προγραμματακι για δευτεροβαθμια εξισωση
ειναι ενταξει γιατι τωρα δεν ειμαι στον η/υ και πως θα το τρεξω στο ubuntu ?
- Κώδικας: Επιλογή όλων
#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int main ()
{
//?edw grafete o kwdikas C++
int a , b , c ,d ,k , x1 ,x2 ,x0;
cout <<"Epilish deyterobathmias exiswsshs\n";
cout <<" Dwse a , b ,c /n";
cin >> a >>b >>c ;
d ==b*b-2ac;
k*k==d ;
{if (k>0)
x1==-b/2a+k/2a;
x2==-b/2a-k/2a;
cout << "Exei dio liseis i e3iswsh\n";
cout << "prwth lysh "<< x1 <<"/n";
cout << "deyterh lysh "<< x2 <<"\n";
if (k==0)
cout << "Tote i exiswsh exei mia lish\t" << x0 ;
else
cout << "Den exei lish stoys pragmatikoys arithmoys\n";
}
system ("pause");
return 0;
}
ειναι ενταξει γιατι τωρα δεν ειμαι στον η/υ και πως θα το τρεξω στο ubuntu ?