Jump to content

[C++]Ecuatie de gradul 1


FnZ
 Share

Recommended Posts

#include <iostream>

using namespace std;

void Program()
{
    int a,b;
    float x;
    cout<< "Introdu primul numar"<<" ";
    cin>>a;
    cout<<endl;
    cout<< "Introdu al doilea numar"<<" ";
    cin>>b;
    cout<<endl;
    x=(float)-b/a;
    cout<< "Rezultatul="<<x<<endl;
}
int main()
{
    Program();
    return 0;
}

Succes

Link to comment
Share on other sites

@Vesca Voi aduga si "//comentarii" in program pe viitor, mutltumesc pentru idee

Edited by TheLittle
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.