Quantcast
Channel: How to write algorithm like this in latex - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 3

How to write algorithm like this in latex

$
0
0

I want to write an algorithm in a latex. There are various ways to write, but I want to write in the way given below. I have tried but I am not able to do anything similar to the given in the image.

enter image description here

see my code:

\documentclass{article}\usepackage[utf8]{inputenc}   \begin{document}Algorithm \\Input : Output : \\1. $T \leftarrow $ an set of size $S$ \\2. \textbf{if} $x = 0$\\3. \hspace{1cm} \textbf{return}\end{document}

Question : Some of the problems, I am facing are the color of the background, line numbering, spacing etc


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images