https://github.com/rezapace/c--program
This repository contains a collection of simple C programs designed to demonstrate various basic programming concepts. Each program is described below with its functionality and expected output.
https://github.com/rezapace/c--program
bahasa c git-reza kuliah-malam kumal-projek webkumal
Last synced: about 1 year ago
JSON representation
This repository contains a collection of simple C programs designed to demonstrate various basic programming concepts. Each program is described below with its functionality and expected output.
- Host: GitHub
- URL: https://github.com/rezapace/c--program
- Owner: rezapace
- Created: 2022-12-21T12:01:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-01T00:26:16.000Z (almost 2 years ago)
- Last Synced: 2025-01-18T06:27:54.873Z (over 1 year ago)
- Topics: bahasa, c, git-reza, kuliah-malam, kumal-projek, webkumal
- Language: C
- Homepage: https://www.webkumal.com/
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple C Programs
This repository contains a collection of simple C programs designed to demonstrate various basic programming concepts. Each program is described below with its functionality and expected output.
## Program 1: Conditional Branching in C
- **Description**: Determines the grade based on the score.
- **Conditions**:
- If the score is less than or equal to 40, the grade is D.
- If the score is less than or equal to 60, the grade is C.
- If the score is less than or equal to 80, the grade is B.
- Otherwise, the grade is A.
## Program 2: Output Program
- **Description**: Displays a specific message.
- **Output**:
- "Your score is 50"
- "Sorry, you did not pass"
## Program 3: Odd Numbers from 1 to 100
- **Description**: Prints all odd numbers between 1 and 100.
## Program 4: Triangle Area Calculator
- **Description**: Calculates the area of a triangle.
- **Parameters**:
- Base
- Height
## Program 5: String Character Count
- **Description**: Counts the number of characters in a string.
- **Input**: The string "Programmer".
## Program 6: Triangle Area Calculation
- **Description**: Calculates the area of a triangle.
## Program 7: Rectangle Area Calculation
- **Description**: Calculates the area of a rectangle.
- **Parameters**:
- Length
- Width
## Program 8: Circle Area Calculation
- **Description**: Calculates the area of a circle.
- **Parameters**:
- Radius (r = 7)
- Pi (π = 3.14)
## Program 9: Even Numbers from 1 to 75
- **Description**: Prints all even numbers between 1 and 75.
## Program 10: Days of the Week Array
- **Description**: Creates an array containing the names of the days of the week.
- **Example**:
- Day 1 is Monday
- Day 2 is Tuesday
## Program 11: Fibonacci Sequence
- **Description**: Outputs the first 5 Fibonacci numbers.
- **Initial Terms**:
- First term = 6
- Second term = 9
## Program 12: Right-Angled Triangle with Stars
- **Description**: Creates a right-angled triangle using stars.
## Program 13: Full Triangle with Stars
- **Description**: Creates a full triangle using stars.
## Program 14: Simple Calculator
- **Description**: Implements a basic calculator.
## Program 15: Rectangle Area Calculation
- **Description**: Calculates the area of a rectangle.
## Program 16: Rectangle Area Calculation
- **Description**: Calculates the area of a rectangle.
## Program 17: Trigonometric Functions
- **Description**: Calculates sine, cosine, and tangent values.
## Program 18: Density Calculation
- **Description**: Calculates the density of a substance.
## Program 19: Counting to One Million
- **Description**: Counts from 1 to 1,000,000 and displays the record.
## Program 20: Cube Surface Area Calculation
- **Description**: Calculates the surface area of a cube.
## Program 21: Odd Numbers from 1 to 75
- **Description**: Prints all odd numbers between 1 and 75.
## Program 22: Data Input and Output
- **Description**: Demonstrates basic data input and output operations.
---
Powered by Reza