Advertisement
DrAungWinHtut

Basic Revision 1

Apr 11th, 2022
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 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 Basic_Revision
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void btnTest_Click(object sender, EventArgs e)
  21.         {
  22.             string sMsg = "Hyper Generation";
  23.             int iAge = 45;
  24.             float fRadius = 1.5f;
  25.             float fArea = 0.0f;
  26.             fArea = 3.14f * fRadius * fRadius;  
  27.             MessageBox.Show ("Area is " + fArea .ToString () + " sq cm");
  28.             if (fArea > 1000)
  29.             {
  30.                 MessageBox.Show("Big Area");
  31.             }
  32.             else
  33.             {
  34.                 MessageBox.Show("Small Area");
  35.             }
  36.          
  37.         }
  38.     }
  39. }
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement