Download this Blogger Template by Clicking Here!

Friday, August 30, 2013

Widgets

CONTOH PROGRAM MDNCARI NILAI MAX AND MIN DI C

#include <stdio.h>
#include <conio.h>
void main()
{
int x,y,z, maksimal,minimal;
clrscr();

printf("Masukkan Bilangan ke 1 :");
fflush(stdin);
scanf("%i",&x);
printf("Masukkan Bilangan ke 2 :");
fflush(stdin);
scanf("%i",&y);
printf("Masukkan Bilangan ke 3 :");
fflush(stdin);
scanf("%i",&z);
if((x>y)&&(x>z))
maksimal=x;
if((y>x)&&(y>z))
maksimal=y;
if((z>x)&&(z>y))
maksimal=z;
if((x<y)&&(x<z))
minimal=x;
if((y<x)&&(y<z))
minimal=y;
if((z<x)&&(z<y))
minimal=z;
printf("#############################################\n\n");
printf(" Bilangan yang terbesar adalah : %i\n",maksimal);
printf(" Bilangan yang terkecil adalah : %i\n",minimal);
printf("#############################################\n\n");
getch();
}

SHARE THIS POST   

  • Facebook
  • Twitter
  • Myspace
  • Google Buzz
  • Reddit
  • Stumnleupon
  • Delicious
  • Digg
  • Technorati
Author: Mohammad
Mohammad is the founder of STC Network which offers Web Services and Online Business Solutions to clients around the globe. Read More →

0 comments: