#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int a[4]={3,2,5,-3}; int x,y; int n=3; int i=1; cout<<"podaj x"<<endl; cin>>x; y=a[0]; while(n>=i) { y=y*x+a[i]; i++; } cout<<"y = "<<y<<endl; system("PAUSE"); return EXIT_SUCCESS; }
peterland