Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace RectAreaPerimeter
- {
- class RectAreaPerimeter
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter a random whole number for side A: ");
- int A = int.Parse(Console.ReadLine());
- Console.WriteLine("Enter a random whole number for side B: ");
- int B = int.Parse(Console.ReadLine());
- //calculations
- int S = A * B;
- Console.WriteLine("The rectangle's surface is: " + S);
- int P = (2 * A) + (2 * B);
- Console.WriteLine("The rectangle's perimeter is: " + P);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement