August 28, 2011

Example 3

Task:
Create a program that require input an integer n.
example output:
if n = 5
*****
*****
*****
*****
*****

if n = 3
***
***
***

Code :
input n
For a <- 1 to n
{
  For b <- 1 to n
  {
    print "*"
  }
}

No comments:

Post a Comment