putar putar

putar putar
 avatar
unknown
plain_text
3 years ago
681 B
9
Indexable
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>

int main (){
	bool putar, sensorValue, lampu;
	int jumlahPutar = 0;
	printf ("==%d==\n", jumlahPutar);
	lampu = false;
	putar = true;
	sensorValue = true;
	
	while (putar == 1){
		if (lampu == false){
			printf ("\nLampu Mati\n");
		}
		jumlahPutar = jumlahPutar+1;
		printf ("--%d--", jumlahPutar);
		if (jumlahPutar == 100){
			sensorValue = false;
		}
		printf ("kali putar\n");
		if (sensorValue ==  false){
			putar = false;
			lampu = true;
		}
	}
	if (putar == false){
		printf ("\npegat");
	}
	if (lampu == true){
		printf ("\nlampu nyala");
	}
	return 0;
}
Editor is loading...