Aquasprite Theme Demo

pemrograman 1 bahasa C_menentukan nilai ganjil genap

Posted by Andi Prawirawan on Selasa, 03 Mei 2011 , under , , | comments (0)



//---------------------------------------------------------------------------
#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;
}
//---------------------------------------------------------------------------