Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- int a = 0;
- int b = 0;
- Console.WriteLine("Podaj liczbę");
- // a = Convert.ToInt32(Console.ReadLine());
- try
- {
- a = Convert.ToInt32(Console.ReadLine());
- }
- catch (Exception)
- {
- Console.WriteLine("Nie podałes liczby");
- }
- int c;
- b = 0;
- try
- {
- c = a / b;
- }
- catch (ArithmeticException)
- {
- Console.WriteLine("Błąd");
- Console.ReadLine();
- }
- /* catch (Exception)
- {
- Console.WriteLine("Błąd nr 2");
- Console.ReadLine();
- }
- */
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement