# omprasadk45-prog/c-program architecture

> Architecture diagram of the GitHub repository omprasadk45-prog/c-program, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omprasadk45-prog/c-program
- Repository: https://github.com/omprasadk45-prog/c-program

## Overview

This is a small collection of independent C loop exercises, not a single application. Users run individual programs; the pattern examples request a row count and print stars, while the digit-sum example uses a hard-coded number and prints its sum. `while_loop.c` contains several commented-out exercises, but its active program checks whether an entered number is an Armstrong number. The `for_loop.c` entry point is empty. No shared runtime or inter-module calls are evident in the sampled source.

Main entry points: [`while_loop.c`](https://github.com/omprasadk45-prog/c-program/blob/main/while_loop.c) (Armstrong check), [`star pattern.c`](https://github.com/omprasadk45-prog/c-program/blob/main/star%20pattern.c) (Star pattern), [`reverse_star_pattern.c`](https://github.com/omprasadk45-prog/c-program/blob/main/reverse_star_pattern.c) (Reverse stars), [`sum_digits_dowhile.c`](https://github.com/omprasadk45-prog/c-program/blob/main/sum_digits_dowhile.c) (Digit sum)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_while["Armstrong check<br/>[while_loop.c]"]
node_forward["Star pattern<br/>[star pattern.c]"]
node_reverse["Reverse stars"]
node_digits["Digit sum"]
node_for["For-loop stub<br/>[for_loop.c]"]

node_user -->|"enters number"| node_while
node_while -->|"prints result"| node_user
node_user -->|"enters rows"| node_forward
node_forward -->|"prints pattern"| node_user
node_user -->|"enters rows"| node_reverse
node_reverse -->|"prints pattern"| node_user
node_digits -->|"prints sum"| node_user

click node_while "https://github.com/omprasadk45-prog/c-program/blob/main/while_loop.c"
click node_forward "https://github.com/omprasadk45-prog/c-program/blob/main/star%20pattern.c"
click node_reverse "https://github.com/omprasadk45-prog/c-program/blob/main/reverse_star_pattern.c"
click node_digits "https://github.com/omprasadk45-prog/c-program/blob/main/sum_digits_dowhile.c"
click node_for "https://github.com/omprasadk45-prog/c-program/blob/main/for_loop.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user toneBlue
class node_while,node_forward,node_reverse,node_digits,node_for toneTeal
```

## Components

### Other components

- **User**
- [Armstrong check](https://github.com/omprasadk45-prog/c-program/blob/main/while_loop.c): `while_loop.c`
- [Star pattern](https://github.com/omprasadk45-prog/c-program/blob/main/star%20pattern.c): `star pattern.c`
- [Reverse stars](https://github.com/omprasadk45-prog/c-program/blob/main/reverse_star_pattern.c): `reverse_star_pattern.c`
- [Digit sum](https://github.com/omprasadk45-prog/c-program/blob/main/sum_digits_dowhile.c): `sum_digits_dowhile.c`
- [For-loop stub](https://github.com/omprasadk45-prog/c-program/blob/main/for_loop.c): `for_loop.c`

## Connections

- User → Armstrong check: enters number
- Armstrong check → User: prints result
- User → Star pattern: enters rows
- Star pattern → User: prints pattern
- User → Reverse stars: enters rows
- Reverse stars → User: prints pattern
- Digit sum → User: prints sum
