CbeginnercliAI generated

Unit & Temperature Converter CLI

A menu-driven console application that converts between common units (temperature, length, weight) using a lookup-based conversion engine, with input validation and a loop for repeated conversions. Learners practice switch statements, function pointers for conversion dispatch, and input validation in C.

Estimate
~6.5h
Steps
5
Completed by
0
Proposed by
codeseed.app

stdio.h · math.h

Project roadmap

  1. 01

    Design the menu and category structure

    ~1h

    Build a text menu letting users pick a conversion category (temperature, length, weight).

  2. 02

    Implement conversion functions

    ~1.5h

    Write individual functions for each conversion pair (C to F, km to miles, kg to lb, etc.).

  3. 03

    Add function-pointer based dispatch

    ~1.5h

    Use an array of function pointers keyed to menu choices to avoid a long if/else chain.

  4. 04

    Add input validation and retry loop

    ~1.5h

    Validate numeric input with strtod and re-prompt on invalid entries instead of crashing.

  5. 05

    Add a conversion history log

    ~1h

    Keep the last N conversions in memory and let the user view them before exiting.

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~6.5h · 5 steps

Tech stack

stdio.hmath.h