sdr panzoel job

/* * Created by SharpDevelop. * User: pc * Date: 05/01/2011 * Time: 13:13 *  * To change this template use Tools | Options | Coding | Edit Standard Headers. */using System;
namespace kita{ class Program { public static void Main(string[] args) { int blnj1, blnj2, blnj3, totblnj, diskon, bayar; Console.WriteLine(“apak”); //inputan Console.Write(“Total Belanja 1= Rp. “); blnj1=Convert.ToInt32(Console.ReadLine()); Console.Write(“Total Belanja 2= Rp. “); blnj2=Convert.ToInt32(Console.ReadLine()); Console.Write(“Total Belanja 3= Rp. “); blnj3=Convert.ToInt32(Console.ReadLine()); //proses totblnj=blnj1+blnj2+blnj3; //Console.Write(“Inputkan Total Belanja=”); //totblnj=Convert.ToInt32(Console.ReadLine()); //selection 1 if(totblnj > 1000000) { Console.WriteLine(“Mendapat Diskon 20%”); diskon=(totblnj*20/100); Console.WriteLine(“Diskon = Rp.” +diskon); bayar=(totblnj-diskon); Console.WriteLine(“Total Bayar = Rp.” +bayar); }  else if (totblnj==100000) { Console.WriteLine(“Mendapat Diskon 2%”); diskon=(totblnj*2/100); Console.WriteLine(“Diskon = Rp.” +diskon); bayar=(totblnj-diskon); Console.WriteLine(“Total Bayar = Rp.” +bayar); } else if (totblnj < 1000000) { Console.WriteLine(“Mendapat Diskon 10%”); diskon=(totblnj*10/100); Console.WriteLine(“Diskon = Rp.” +diskon); bayar=(totblnj-diskon); Console.WriteLine(“Total Bayar = Rp.” +bayar); } Console.Write(“Press any key to continue . . . “); Console.ReadKey(true); } }}

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: