Selasa, 25 November 2014

mencari sebuah diskon bahasa c

//Nama : Muhammad andi mubaroq//
//NIM : A11.2014.08438//
//Tanggal : 15 Oktober 2014//
#include <stdio.h>
#include <stdlib.h>

int main()
{
    //Kamus//
    int kuantitas, harga, total;

    //Program//
    printf ("Masukkan jumlah pembelian balon : \n");
    scanf ("%f", &kuantitas); //input jumlah pembelian balon//


    if (kuantitas==1)
        {
            harga=40;
        }
    else if ((kuantitas>=2)&&(kuantitas<=10))
        {
            harga=30;
        }
    else if ((kuantitas >=11)&&(kuantitas<=30))
        {
            harga=20;
        }
    else
        {
            harga=600;
        }

    total=kuantitas*harga;
    printf ("Jadi harga balon setelah mendapatkan diskon adalah: %f", total);

    return 0;
}

1 komentar:

  1. 1xbet korean football league | legalbet.co.kr
    In the 메리트 카지노 쿠폰 event of an injury, bet365 may not 1xbet korean have to predict the result. When the team that suffered a match in the game, the 제왕카지노 odds of a 2x bet are

    BalasHapus