0% found this document useful (0 votes)
9 views

PF Lab Quiz 2 - Fall24 - C

Uploaded by

syedkanzuleman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

PF Lab Quiz 2 - Fall24 - C

Uploaded by

syedkanzuleman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Programming Fundamental

Lab Quiz 1
Time: 75 Min.

Q1: Write a program to draw a butterfly pattern using stars.

Example:
For n = 5, the output should be:
* *
** **
*****
** **
* *
Q2: Write a program to print all strong numbers between two given numbers.

Description:
A strong number is a number in which the sum of the factorials of the digits equals the number itself.

Q3: Write a program which checks the powerful number. A positive integer is called a powerful
number of order n if
xyz = xn + yn + zn
Where n is total number of digits.
153= 13+53+33 (153 is powerful because the sum of the cube of each digit produce original
number).

You might also like