Mulai Baca x S=x%2 S=0 “Genap” Selesai Yes No XSS=0?Output main() { int x,s; cin>>x; s=x%2; if(s==0) { cout<<“Genap”’; }
Mulai Baca x X=5 XSS=0?Output 5
Mulai Baca x S=x%2 X=5 XSS=0?Output 51
Mulai Baca x S=x%2 S=0 X=5 XSS=0?Output 51 No
Mulai Baca x S=x%2 S=0 Selesai No X=5 XSS=0?Output 51 No
Mulai Baca x X=4 XSS=0?Output 4
Mulai Baca x S=x%2 X=4 XSS=0?Output 40
Mulai Baca x S=x%2 S=0 X=4 XSS=0?Output 40Yes
Mulai Baca x S=x%2 S=0 “Genap” Selesai Yes X=4 XSS=0?Output 40YesGenap