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
Genetic Diseases Problem Description Many human diseases could be controlled by the knowledge of the gene's structure and pattern. The human gene could be represented by fou

Class a Abstract Data Type: is a template for creating objects. A class describes a collection of related objects i.e. instances of the classes. Basically classes are user-defined

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

how to create a screen for messages for a data transmission system

Carnivorous Carla only eats pizza if it has at least three of the following ingredients: ham, pepperoni, salami, italian sausage, bacon. You have the function contains() to check w

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

Advantages of java stored procedures Transactions Although a saved process contains SQL orders, once collected it will socialize with SQL Hosting server very diversely from

LALR Parser: Rule Table - Contains definitions of production rules within the grammar. Attributes: Count - Number of production rules in the table Child items:

I need to finish my game project within two weeks using XNA. Would you guys can help me to finish it? Thank you

Question: (a) How does HTML allow you to: (i) turn an image into a clickable hyperlink? Include code to switch off the default border (ii) convert the above hyperlink i