Please enable JavaScript to use CodeHS

Brilliant Numbers

In this project, students will write a program to determine if a number is a brilliant number. A brilliant number is defined as a positive integer with exactly two prime factors of the same digital length.

Easy

2 Hours

High School

Project Description

Background

A Brilliant number is a term first coined by Peter Wallrodt. The term refers to a positive integer that has exactly two prime factors, both with the same number of digits. For example, the number 3569 is a brilliant number since the only two factors are 43 and 83, both of which are two digits. Another example is 83779 which has to factors 421 and 199, both of which are 3 digits.


Your Task

For this project, you will write a program that takes a number as an input and prints our whether that number is a brilliant number.

Example output:

Please enter an integer: 83779
The number is Brilliant


Please enter an integer: 75
The number is not Brilliant

Project Demo

Explore this program before assigning it!

Project Overview

Here is an outline of the project activities: