Shell script to print left traingle, Programming Languages

Left Triangle

 

Program

 

#W.A.S.S. to create left triangle

 

echo -e "enter num:\c"

read n

j=1

k=1

 

while test $k -le $n       #this loop print as many line of * as the value of k

do

  j=1

 while test $j -le $k      #this loop print as many * per line as the value of j

 do

     echo -e " * \c"

     j=`expr $j + 1`

done

echo " "

k=`expr $k + 1`

done

 

Output

 

enter num:7

 *

 *  *

 *  *  *

 *  *  *  *

 *  *  *  *  *

 *  *  *  *  *  *

 *  *  *  *  *  *  *

Posted Date: 9/26/2012 4:34:57 AM | Location : United States







Related Discussions:- Shell script to print left traingle, Assignment Help, Ask Question on Shell script to print left traingle, Get Answer, Expert's Help, Shell script to print left traingle Discussions

Write discussion on Shell script to print left traingle
Your posts are moderated
Related Questions
What is JVM-Java Virtual Machine  A JVM stands for java virtual machine. This is virtual computer or an abstract computer that runs the complied java programs. In fact JVM is

Suppose you have a ?le orase of city and country names, like this: Cluj, Romania Debrecen, Hungary Klagenfurt, Austria Berlin, Germany Szeged, Hungary Budapest, Hungary Lintz, A

i what to know how setcapture() api work in c#

how to rewrite C++ program the DNAStrand class (DNA Project) to instead store the nucleotide sequence in a dynamically-allocated array?

You are working in charge of a group of programmers at a software company. Your task is to assess and research CORBA and to produce a report to be given to the programmers detailin

We need Advancement in Existing PhoneGap Application We need a PhoneGap expert to aid us extend an existing PhoneGap application. The app works pulls data from a new website (de

I am getting error at business layer object in code behind page.


I am working on a matlab project and need help debugging one question i have written and need help working through another problem.

Assigment 01 Subject Code: ITE 2106 Subject Name: Software Engineering You run a software development organization catering to external clients to build software solutions. The bus