https://github.com/rezapace/golang-program
program sederhana
https://github.com/rezapace/golang-program
Last synced: over 1 year ago
JSON representation
program sederhana
- Host: GitHub
- URL: https://github.com/rezapace/golang-program
- Owner: rezapace
- Created: 2022-12-21T11:56:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T11:57:59.000Z (over 3 years ago)
- Last Synced: 2023-03-11T10:24:03.401Z (over 3 years ago)
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Golang Programs
## Description
This repository contains a collection of simple Golang programs designed to demonstrate various programming concepts and functionalities. Each program is described below with its respective functionality and expected output.
## Programs
### Program 1: Conditional Branching
- If the score is less than or equal to 40, the grade is D.
- If the score is less than 61, the grade is C.
- If the score is less than 81, the grade is B.
- Otherwise, the grade is A.
### Program 2: Output Example
- Your score is 50.
- Sorry, you did not pass.
### Program 3: Odd Numbers
- Displays odd numbers from 1 to 100.
### Program 4: Triangle Area Calculator
- Calculates the area of a triangle given the base and height.
### Program 5: Character Count
- Displays the number of characters in a string.
- Example input: "Programmer".
### Program 6: Triangle Area Calculation
- Calculates the area of a triangle.
### Program 7: Rectangle Area Calculator
- Calculates the area of a rectangle given the length and width.
### Program 8: Circle Area Calculator
- Calculates the area of a circle with π = 3.14 and radius = 7.
### Program 9: Even Numbers
- Displays even numbers from 1 to 75.
### Program 10: Days of the Week Array
- Creates an array containing the names of the days from Monday to Sunday.
- Example output: "Day 1 is Monday", "Day 2 is Tuesday", etc.
### Program 11: Fibonacci Sequence
- Displays the first 5 Fibonacci numbers with the first term = 6 and the second term = 9.
### Program 12: Right-Angled Triangle
- Creates a right-angled triangle using asterisks.
### Program 13: Full Triangle
- Creates a full triangle using asterisks.
### Program 14: Simple Calculator
- A basic calculator program.
### Program 15: Rectangle Area Calculation
- Calculates the area of a rectangle.
### Program 16: Rectangle Area Calculation
- Calculates the area of a rectangle.
### Program 17: Trigonometric Functions
- Calculates sine, cosine, and tangent angles.
### Program 18: Density Calculation
- Calculates density.
### Program 19: Counting to One Million
- Counts from 1 to 1,000,000 and displays the record.
### Program 20: Cube Surface Area
- Calculates the surface area of a cube.
### Program 21: Odd Numbers
- Displays odd numbers from 1 to 75.
### Program 22: Input and Output
- Demonstrates input and output operations.
---
Powered by Reza