Advertisement
Guest User

Untitled

a guest
Jul 15th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main(){
  5.         double a, b;
  6.  
  7.         Console.WriteLine("Podaj długości bokow prostokąta");
  8.         a = double.Parse(Console.ReadLine());
  9.         b = double.Parse(Console.ReadLine());
  10.         Console.WriteLine("Długości bokow to: " + a + " oraz: " + b);
  11.         Console.WriteLine("Pole wynosi: " + rectangleArea(a, b));
  12.  
  13.     }
  14.     public static double rectangleArea(double a, double b){
  15.         return a*b;
  16.     }
  17.    
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement