Skip to content

just learning Fortran while exploring the history of programming

Notifications You must be signed in to change notification settings

anuja-rahul/fortran-cal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Fortran Calculator

I'm just learning Fortran while exploring the history of programming. This script is a part of my journey to understand how programming languages have evolved over time.

This is a simple calculator program written in Fortran. It supports basic arithmetic operations: addition, subtraction, multiplication, and division.

Usage

  1. Compile the Fortran source code:

    gfortran -o calculator calculator.f90
  2. Run the executable:

    ./calculator
  3. Follow the prompts to enter two numbers and an operator.

Features

  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Division (/)

Example

Fortran Calculator
Enter first number: 10
Enter second number: 5
Enter the operator (+ - * /): /
Result: 1.00

Notes

  • Ensure that the second number is not zero when performing division to avoid division by zero errors.
  • The program will display an error message for invalid operators.

About

just learning Fortran while exploring the history of programming

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published