#include<stdio.h>
#include<stdlib.h>
main () {
printf(":::::::::::::::::::::::::-SELAMAT BERMAIN DI GAME LOGIKA-::::::::::::::::::::::: \n ");
printf(" Masukkan Nama Anda\n ");
printf(" \n ");
printf(" contah : 2>3 \n ");
printf(" jika anda input 1 maka anda salah \n ");
int a1 = 6 ;
int a3 = 20 ;
int a2 = 7;
int a4 = 9;
int a5 = 10;
int a = 0;
int b = 0 ;
int c = 0 ;
printf("Masukan Angka Tebakan ronde 1: ");
scanf("%i", &c);
a1=(c+a1) %10;
a =(c > a1)? 1:0;
printf ("%s\n",(c>a1)?"anda benar":"anda salah");
printf ("nilai anda %d\n",a);
printf ("nilai misteri :%d\n",a1);
b = b+a ;
printf("Masukan Angka Tebakan ronde 2: ");
scanf("%i", &c);
a2=(c*a2)%10 ;
a =(c > a2)? 1:0;
printf ("%s\n",(c>a2)?"anda benar":"anda salah");
printf ("nilai anda %d\n",a);
printf ("nilai misteri :%d\n",a2);
b = b+a ;
printf("Masukan Angka Tebakan ronde 3: ");
scanf("%i", &c);
a=(c%a3)%10 ;
a =(c > a3)? 1:0;
printf ("%s\n",(c>a3)?"anda benar":"anda salah");
printf ("nilai anda %d\n",a);
printf ("nilai misteri :%d\n",a3);
b = b+a ;
printf("Masukan Angka Tebakan ronde 4: ");
scanf("%i", &c);
a=(c/a4)%10 ;
a =(c > a4)? 1:0;
printf ("%s\n",(c>a4)?"anda benar":"anda salah");
printf ("nilai anda %d\n",a);
printf ("nilai misteri :%d\n",a4);
b = b+a ;
printf("Masukan Angka Tebakan ronde 5: ");
scanf("%i", &c);
a=(c-a5)%10 ;
a =(c > a5)? 1:0;
printf ("%s\n",(c>a5)?"anda benar":"anda salah");
printf ("nilai anda %d\n",a);
printf ("nilai misteri :%d\n",a5);
b = b+a ;
printf ("nilai total :%d\n",b);
printf ("nilai salah :%d\n",5-b);
system("pause");
}
Monday, November 7, 2011
11:18 PM
Game of codeblocks
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment