Нет ничего невозможного, если ты охерел до нужной степени.
http://cplusplus.com/doc/tutorial/variables/
pastebin.com/jDTj2HGT
#include
#include "second.h"
int main(){
double otv=0;
for (long long j = 2000;; j+=10000){
double EPS = (10)/j;
for (double i = 0; i <10; i+=EPS)
otv+=EPS*f(i+EPS/2);
std::cout << j << " " << otv << std::endl;
otv = 0;
}
return 0;
}
#include
double f(double x){ /* i hate blih */
return pow(x,3);
}
#include "one.cpp"
double f(double x); /* i hate blih */
pastebin.com/jDTj2HGT
#include
#include "second.h"
int main(){
double otv=0;
for (long long j = 2000;; j+=10000){
double EPS = (10)/j;
for (double i = 0; i <10; i+=EPS)
otv+=EPS*f(i+EPS/2);
std::cout << j << " " << otv << std::endl;
otv = 0;
}
return 0;
}
#include
double f(double x){ /* i hate blih */
return pow(x,3);
}
#include "one.cpp"
double f(double x); /* i hate blih */