Guest User

Untitled

a guest
Apr 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. bool flag;
  2. int val;
  3. string output;
  4. double value1;
  5. double result;
  6.  
  7.  
  8. flag = double.TryParse(txtValue1.Text, out value1);
  9. if (flag == false)
  10. {
  11. MessageBox.Show("Only Integer type!");
  12. txtValue1.Clear();
  13. txtValue1.Focus();
  14. return;
  15. }
  16.  
  17. result = value1 % 4;
  18. txtResult.Text = result.ToString();
Add Comment
Please, Sign In to add comment