October 2018 2 38 Report

Witam, ktoś pomógłby mi znaleźć błąd w tym programie napisanym w c++(chodzi o Schemat Hornera)

#include <iostream>
#include <cstdlib>

using namespace std;

float horner(int k, float tab_wsp[], float x)

{

if (k==0)

return tab_wsp[0]*x;

else

return horner(k-1,tab_wsp,x)* x + tab_wsp[k];

}

int main(int argc, char *argv[]) {
cout<<horner(1,1,1)<<endl;
return 0;
system("PAUSE")
}


More Questions From This User See All

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.