Hai sahabat pembaca naufal adnani!

Disini saya akan membuat program yabg menentukan nilai rindu dengan pasangan mu bedrasarkan gejolak rindu terhadap waktu dengan memasukkan

a = lama tahun ketemuan

b = lama bulan ketemuan

c = lama minggu ketemuan

d = lama hari ketemuan

x awal = jam rindu pertama kali muncul

x akhir = jamĀ  saat ini ketika masih rindu

Dimana formatprogram adalah:

#include<stdio.h>
#include<conio.h>

void integralA()
{
double a, a1, a2, a3, a4, b, b1, b2, b3, b4, c, c1, c2, c3, c4, d, d1, d2, d3, d4, x1, x2, fungsiA, fungsiB, integral, integralA, integralB;
a1 = a*x1*x1*x1;
b1 = b*x1*x1;
c1 = c*x1;
d1 = d;

a2 = a*x2*x2*x2;
b2 = b*x2*x2;
c2 = c*x2;
d2 = d;

fungsiA = a1 + b1 + c1 + d1;
fungsiA = a2 + b2 + c2 + d2;

a3 = 3*a*x1*x1;
b3 = 2*b*x1;
c3 = c;

a4 = 3*a*x1*x1;
b4 = 2*b*x1;
c4 = c;

integralA = a3 + b3 + c3;
integralB = a4 + b4 + c4;

integral = integralB – integralA

}

void main ()
{
double a, a1, a2, a3, a4, b, b1, b2, b3, b4, c, c1, c2, c3, c4, d, d1, d2, d3, d4, x1, x2, fungsiA, fungsiB, integral, integralA, integralB;

printf(“Program Pencari Luas Fungsi\ny = a.x^3 + b.x^2 + c.x + d”);
start:
printf(“\n\nmasukan nilai a = “);
scanf(“\n%d”, &a);
printf(“\nmasukan nilai b = “);
scanf(“\n%d”, &b);
printf(“\nmasukan nilai c = “);
scanf(“\n%d”, &c);
printf(“\nmasukan nilai d = “);
scanf(“\n%d”, &d);
scanf(“\n\nmasukan nilai x awal = %d”, x1);
scanf(“\n\nmasukkan nilai x akhir = %d”, x2);
printf(“\n\n f(x awal) = %d”, fungsiA);
printf(“\n\n f(x akhir) = %d”, fungsiB);
printf(“\n\n f'(x awal) = %d”, integralA);
printf(“\n\n f'(x akhir) = %d”, integralB);
printf(“\n\n Luas Fungsi = %d”, integral);
getch();
goto start;
}