44 lines
		
	
	
		
			958 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			958 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// For more tutorials: https://blog.learngoprogramming.com
 | 
						|
//
 | 
						|
// Copyright © 2018 Inanc Gumus
 | 
						|
// Learn Go Programming Course
 | 
						|
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
 | 
						|
//
 | 
						|
 | 
						|
package main
 | 
						|
 | 
						|
// ---------------------------------------------------------
 | 
						|
// EXERCISE: Find the Rectangle's Perimeter
 | 
						|
//
 | 
						|
//  1. Find the perimeter of a rectangle
 | 
						|
//     Its width is  5
 | 
						|
//     Its height is 6
 | 
						|
//
 | 
						|
//  2. Assign the result to the `perimeter` variable
 | 
						|
//
 | 
						|
//  3. Print the `perimeter` variable
 | 
						|
//
 | 
						|
// HINT
 | 
						|
//  Formula = 2 times the width and height
 | 
						|
//
 | 
						|
// EXPECTED OUTPUT
 | 
						|
//  22
 | 
						|
//
 | 
						|
// BONUS
 | 
						|
//  Find more formulas here and calculate them in new programs
 | 
						|
//  https://www.mathsisfun.com/area.html
 | 
						|
// ---------------------------------------------------------
 | 
						|
 | 
						|
func main() {
 | 
						|
	// UNCOMMENT THE CODE BELOW:
 | 
						|
 | 
						|
	// var (
 | 
						|
	// 	perimeter        int
 | 
						|
	// 	width, height = 5, 6
 | 
						|
	// )
 | 
						|
 | 
						|
	// USE THE VARIABLES ABOVE WHEN CALCULATING YOUR RESULT
 | 
						|
 | 
						|
	// ADD YOUR CODE BELOW
 | 
						|
}
 |