[su_expand more_text=”Show code” less_text=”Hide code” height=”30″]1) Atur cara 3.1
[/su_expand]
#include
int main () {
int bil, bilCampur, bilTolak;
bil = 24;
bilCampur = bil++; bilTolak = ++bil;
printf( "bil = %d, bilCampur = %d, iTolak = %d", bil,
bilCampur, bilTolak);
return 0;
}
[su_expand more_text=”Show code” less_text=”Hide code” height=”30″]2) Atur cara 3.2
[/su_expand]
#include <stdio.h>
int main () {
int b = 2, nombor = 0, jum = 0, purata = 3;
nombor = b = 10 + (jum=10-purata);
printf("%d %d %d %d", b , nombor, jum, purata);
return 0;
}
[su_expand more_text=”Show code” less_text=”Hide code” height=”30″]3) Atur cara 3.3
[/su_expand]
#include <stdio.h>
#include <math.h>
int main () {
double sisi_a, sisi_b, sisi_c;
sisi_a = 5.2;
sisi_b = 2.5;
//kira sisi c
sisi_c = sqrt((pow(sisi_a, 2.0)) + (pow(sisi_b, 2.0)));
printf("Panjang hipotenus: %f", sisi_c);
return 0;
}