robercik1010

Untitled

Jun 20th, 2014
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.62 KB | None | 0 0
  1. using System;
  2. using System.Windows.Forms;
  3. namespace TEST
  4. {
  5.     class MainClass
  6.     {
  7.         public static void Main (string[] args)
  8.         {
  9.             int a = 5;
  10.             int b = 2;
  11.             int i;
  12.             string[] z = new String[5];
  13.             z[0] = String.Format("Wynik dodawania {0} + {1} = {2}",a,b,a+b);
  14.             z[1] = String.Format("Wynik odejmowania {0} - {1} = {2}",a,b,a-b);
  15.             z[2] = String.Format("Wynik mnożenia {0} * {1} = {2}",a,b,a*b);
  16.             z[3] = String.Format("Wynik dzielenia {0} / {1} = {2}",a,b,a/b);
  17.             z[4] = String.Format ("Reszta z dzielenia {0} % {1} = {2}", a, b, a % b);
  18.                 for(i=0;i<5;i++){
  19.                     MessageBox.Show(z[i]);
  20.                 }
  21.            
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment