Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <cmath>
- //oblicz wartosc wyrazenia y=x^3+x^2+x dla wszystkich liczb calkowitych z przedzialu <m,n> - m,n podajemy z klawiatury
- using namespace std;
- int main(int argc, char *argv[])
- {
- float n,m,x,y ;
- cout<<"podaj m.n "<<endl;
- cin>>m>>n;
- x=m;
- do
- {
- y=pow(x,3)+pow(x,2)+x;
- cout<<y<<endl;
- x=x+1;}
- while(x<=n);
- system("PAUSE");
- return EXIT_SUCCESS;
- }
Add Comment
Please, Sign In to add comment