Make a fundamental basic note for my C Programming that I am allow to use in the exam room. I know nothing about programming. the note takes one side of A4. I repeat it, I know nothing about programming.
#include <stdio.h> double w = 0.01, h, area, x, diff, prev; int c; int main() { c = 0; while(1){ h = 0; for(x = -5.0; x < 10.0; x = x + w) { h = h + (x*x + 2 * x + 3); } area = h * w; w = w/10.0; if(c == 1){ diff = prev - area; if (diff<0.0){ diff = - diff; } if (diff<0.0001) break; } c = 1; prev = area; printf("%f\n", area); } return 0; }