Include : #include
Contoh :
#include
main()
{
int x,y;
div_t hasil;
clrscr();
printf(“Contoh fungsi — div —”);
printf(“\n\nMasukkan nilai x :”); scanf(“%d”,&x);
printf(“\n\nMasukkan nilai y :”); scanf(“%d”,&y);
hasil = div(x,y);
printf(“\n\n%-3d DIV %3d = %3d sisa %3d”,x,y,hasil.quot,hasil.rem);
getch();
}
Tidak ada komentar:
Posting Komentar