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.
- 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.
- Description: Displays a specific message.
- Output:
- "Your score is 50"
- "Sorry, you did not pass"
- Description: Prints all odd numbers between 1 and 100.
- Description: Calculates the area of a triangle.
- Parameters:
- Base
- Height
- Description: Counts the number of characters in a string.
- Input: The string "Programmer".
- Description: Calculates the area of a triangle.
- Description: Calculates the area of a rectangle.
- Parameters:
- Length
- Width
- Description: Calculates the area of a circle.
- Parameters:
- Radius (r = 7)
- Pi (π = 3.14)
- Description: Prints all even numbers between 1 and 75.
- Description: Creates an array containing the names of the days of the week.
- Example:
- Day 1 is Monday
- Day 2 is Tuesday
- Description: Outputs the first 5 Fibonacci numbers.
- Initial Terms:
- First term = 6
- Second term = 9
- Description: Creates a right-angled triangle using stars.
- Description: Creates a full triangle using stars.
- Description: Implements a basic calculator.
- Description: Calculates the area of a rectangle.
- Description: Calculates the area of a rectangle.
- Description: Calculates sine, cosine, and tangent values.
- Description: Calculates the density of a substance.
- Description: Counts from 1 to 1,000,000 and displays the record.
- Description: Calculates the surface area of a cube.
- Description: Prints all odd numbers between 1 and 75.
- Description: Demonstrates basic data input and output operations.
Powered by Reza