Quist perkalian sederhana dengan bahasa c


Share kali ini tentang Quist pilihan sederhana dengan soal perkalian…
cara kerja Quist ini:
1. Apabila anda slah menjawab pertanyaan maka akan muncul 4 keterangan sesuai keslahan yang diperbuat seberapa jauh kemiripan jawaban:
– No. Please try again
– Wrong. try once more
– dont give up
– no. keep trying

2. Apabila anda menjawab dengan tepat juga ada bebrapa komentar sesuai dengan jawaban anda:
– Very Good !
– Excellent !
– Nice Work !
– Keep up the good work !
3. ada pilihan lagi apakah anda mau lanjut atau tidak setelah menjawab..

Langsung aja berikut scriptnya:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#include<conio.h>
void main()
{
    int bil1,bil2,jawab,rand_y,rand_t;
    srand ((unsigned)time(NULL) );

    char pil;
    do
    {
        bil1 = 1 + (rand()%9);
        bil2 = 1 + (rand()%9);

        do
        {
            printf (“%d x %d = “,bil1, bil2);
            scanf (“%d”,&jawab);
            clrscr();
            if (jawab==(bil1*bil2)){
                rand_y = (rand()%4);
                switch(rand_y){
                case 0:
                    printf (“Very Good !”);
                    break;
                case 1:
                    printf (“Excellent !”);
                    break;
                case 2:
                    printf (“Nice Work !”);
                    break;
                case 3:
                    printf (“Keep up the good work !”);
                    break;
                }
            }
            else {
                rand_t = (rand()%4);
                switch(rand_t){
                case 0:
                    printf (“No. Please try again”);
                    break;

                case 1:
                    printf (“Wrong. try once more”);
                    break;

                case 2:
                    printf (“dont give up”);
                    break;

                case 3:
                    printf (“no. keep trying.”);
                    break;

                }
                printf (“\n”);

            }
        }
        while(jawab!=(bil1*bil2));

        printf (“\nApakah anda ingin melanjutkan lagi (y/t)? “);
        fflush(stdin);
        scanf(“%c”,&pil);
        clrscr();
    }
    while (tolower(pil)==’y’);
}

Sumber link: http://www.kaskus.us/


5 thoughts on “Quist perkalian sederhana dengan bahasa c

  1. you’re in point of fact a excellent webmaster. The website loading velocity is amazing.
    It sort of feels that you are doing any unique trick.
    Furthermore, The contents are masterwork. you’ve performed a magnificent task on this topic!

  2. Choose a well known, reputable company for your
    promotional gifts and promotional gift boxes and you should be very happy with all of your future purchases.
    Fun and bizarre gifts are a great way to acknowledge fun loving and humorous friends,
    family and coworkers. The Honey Baked Ham Company offers both hams and turkeys that will
    feed a dinner party.

  3. So next time you look enviously at that bronzed girl walking down the street,
    remember that with the help of fake tan products, that could easily be you.
    Film make-up artists apparently always know what
    the actor has been doing just by the way their skin feels.
    Also apply the tanner on the earlobes and upper ears.

  4. In the case of someone who is an entry-level employee, schooling may come before work experience.

    In the service industries, reports can show how time is
    allocated. In Pakistan prize bond is issued with following denominations rupees 100, 200, 750, 1500 , 15000 and 40000 which is divided into these categories because of different classes existing in Pakistan.

  5. They are not meant to be employed on a regular foundation.
    The main purpose of penis enlargement pump is to help in erectile dysfunction so that you can get the
    desired erection and maintain it. Some men who suffer from impotence use the penis pump to get an erection by placing a compression ring
    at the base of the penis and use the vacuum pump.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s