pemrograman 1 bahasa C_menentukan nilai ganjil genap
//---------------------------------------------------------------------------
#include <vcl\condefs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#pragma hdrstop
//---------------------------------------------------------------------------
USERES("project1.res");
//---------------------------------------------------------------------------
int main(int argc, char **argv)
{
int z;
printf("PROGRAM MENENTUKAN GANJIL GENAP \n");
printf("----------------------------------- \n");
printf("masukkan angka : ");scanf("%d",&z);
if (z% 2==0)
{
printf("bilangan genap");
}
{
if (z% 2==1)
printf("bilangan ganjil");
}
getch();
return 0;
}
//---------------------------------------------------------------------------