Advertisement
yoshoo

Untitled

Sep 2nd, 2019
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.06 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace WindowsFormsApp1
  12. {
  13.     public partial class Form2 : Form
  14.     {
  15.         public Form2()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void button1_Click(object sender, EventArgs e)
  21.         {
  22.             if (int.Parse(textBox1.Text) == 1)
  23.             {
  24.                 textBox2.Text = "JANUARI";
  25.             }
  26.  
  27.             else if (int.Parse(textBox1.Text) == 2)
  28.             {
  29.                 textBox2.Text = "FEBRUARI";
  30.             }
  31.  
  32.             else if (int.Parse(textBox1.Text) == 3)
  33.             {
  34.                 textBox2.Text = "MARET";
  35.             }
  36.  
  37.             else if (int.Parse(textBox1.Text) == 4)
  38.             {
  39.                 textBox2.Text = "APRIL";
  40.             }
  41.  
  42.             else if (int.Parse(textBox1.Text) == 5)
  43.             {
  44.                 textBox2.Text = "MEI";
  45.             }
  46.  
  47.             else if (int.Parse(textBox1.Text) == 6)
  48.             {
  49.                 textBox2.Text = "JUNI";
  50.             }
  51.  
  52.             else if (int.Parse(textBox1.Text) == 7)
  53.             {
  54.                 textBox2.Text = "JULI";
  55.             }
  56.  
  57.             else if (int.Parse(textBox1.Text) == 8)
  58.             {
  59.                 textBox2.Text = "AGUSTUS";
  60.             }
  61.  
  62.             else if (int.Parse(textBox1.Text) == 9)
  63.             {
  64.                 textBox2.Text = "SEPTEMBER";
  65.             }
  66.  
  67.             else if (int.Parse(textBox1.Text) == 10)
  68.             {
  69.                 textBox2.Text = "OKTOBER";
  70.             }
  71.  
  72.             else if (int.Parse(textBox1.Text) == 11)
  73.             {
  74.                 textBox2.Text = "NOVEMBER";
  75.             }
  76.  
  77.             else if (int.Parse(textBox1.Text) == 12)
  78.             {
  79.                 textBox2.Text = "DESEMBER";
  80.             }
  81.  
  82.             else
  83.             {
  84.                 textBox2.Text = "?";
  85.             }
  86.         }
  87.     }
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement