1. Home
  2. /
  3. Eiffel
  4. /
  5. Multiplication Table

Multiplication Table - Eiffel Typing CST Test

Loading…

Multiplication Table — Eiffel Code

Prints the multiplication table of a number.

class
	MULT_TABLE
feature
	print_table (n: INTEGER)
		local i: INTEGER
		do
		from i := 1 until i > 10 loop
		io.put_integer(n); io.put_string (" x "); io.put_integer(i); io.put_string (" = "); io.put_integer(n * i); io.put_new_line
		i := i + 1
		end
		end
end

! Run
local
	t: MULT_TABLE
do
	create t
	t.print_table(5)
end

Eiffel Language Guide

Eiffel is a high-level, object-oriented programming language designed for software engineering with a strong emphasis on correctness, reusability, and maintainability. It supports the Design by Contract methodology, promoting robust and reliable applications.

Primary Use Cases

  • ▸High-reliability enterprise software
  • ▸Safety-critical systems
  • ▸Reusable component libraries
  • ▸Formal software engineering projects
  • ▸Educational use for software engineering principles

Notable Features

  • ▸Design by Contract
  • ▸Strong static typing
  • ▸Generic classes and collections
  • ▸Multiple inheritance with controlled resolution
  • ▸Automatic memory management (garbage collection)

Origin & Creator

Eiffel was created by Bertrand Meyer in the late 1980s at ETH Zurich and later developed further at Interactive Software Engineering.

Industrial Note

Eiffel is used in safety-critical systems, mission-critical enterprise applications, embedded systems requiring high reliability, and software frameworks emphasizing correctness.

More Eiffel Typing Exercises

Eiffel Counter and Theme ToggleEiffel Fibonacci SequenceEiffel Factorial CalculatorEiffel Prime CheckerEiffel Sum of ArrayEiffel Reverse StringEiffel Temperature ConverterEiffel Simple Alarm SimulationEiffel Random Walk Simulation

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher