2 Replies - 2645 Views - Last Post: 06 November 2011 - 11:28 AM

#1 captainhampton   User is offline

  • Jawsome++;
  • member icon

Reputation: 14
  • View blog
  • Posts: 548
  • Joined: 17-October 07

Pronic Number

Posted 15 September 2010 - 10:27 AM

Description: Call the function to get a group of asterisks to represent the nth pronic number to which you have called the function with.A pronic number is the product of two consecutive integers n(n+1). For more information : http://en.wikipedia....i/Pronic_number
# Program calculates the nth Pronic number and outputs a display of
# asterisk characters of the respective number. A Pronic number is a
# number which is the product of two consecutive integers, n(n+1)
# Author : Vincent Russo

def Pronic(n):
	p = n*(n+1)
	for i in range(n):
		for i in range(n+1):
			print "*",
		print ""
	return p 

print "Pronic Number is: " 
print Pronic(2)	


Is This A Good Question/Topic? 0
  • +

Replies To: Pronic Number

#2 20029388   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 24-October 10

Re: Pronic Number

Posted 26 October 2010 - 10:42 PM


Was This Post Helpful? 0
  • +
  • -

#3 ionut27   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 06-November 11

Re: Pronic Number

Posted 06 November 2011 - 11:28 AM

how can i write this in VB.NET?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1